I\'v read: Rails: Pass parameters with render :action? ,but I\'m still having problems.
My URL for the new page is: http://localhost:3000/submit?category_id=2. Su
I think the else clause of your 'create' method will need to roughly mirror your 'new' method, which means populating @category
again from your params
hash.
So first make sure your hidden field is populated, then check the contents of params
when the form is submitted. category_id
should be there and you'll need to grab it again as you did in 'new', if the save fails.