Search code examples
ruby-on-railsrhomobile

How does ruby on rails know what to put in @params?


What should I do in my html page to get the id/value into the @params instance in a controller method on a POST? Ie:

<input type='hidden' id='qgroup' value='blahDeBlah'/>

How would I get the value of id='qgroup' into the @params with the right id as the key?


Solution

  • You need to add the name of the field to use it from the params.

    <input type='hidden' name='qgroup' id='qgroup' value='blahDeBlah'/>