I am trying to pass a value from a view to the controller. The user is submitting a form, and I want to pass a hidden value which is not related to the form itself. So my question is: how can I manually add entries to the params hash?
Use params.merge
.
See docs: http://ruby-doc.org/core/classes/Hash.html#M000759
A similar question: Rails - Is there a shortcut to pass all existing params?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With