> On Dec 2, 2014, at 12:00 PM, Scott Ribe <scott_r...@elevated-dev.com> wrote: > > Note what's different in your form between appt_completion and other input > elements: you're using plain tag helpers instead of the form methods, > radio_button_tag instead of f.radio_button, which means the appt_completion > parameters are not going to be associated with the record associated with the > form via form_for. > > And while I was typing this, Hassan gave another hint, which is EXTREMELY > important. Look at the log when you submit the form, and examine the > parameters. You MUST do this if you want to see what is happening. > > The tutorial should help you understand how form data is submitted, how RoR > parses it, and how it is passed through to your controller action. It's not > magic, the forms are just HTML, and the RoR methods that generate input > elements use conventions regarding the element names & ids used in that HTML, > and then other RoR methods expect those conventions when receiving the data > from the browser. > > But ultimately, the parameters as parsed by RoR are the first place to look > for "where did my data go" questions, because that's where you figure out > whether the form is not configured to submit the data correctly, or whether > the problem is in how you're handling the data--is the problem in the form or > the controller.
Also I still stand by my advice from yesterday: inspect the elements in the browser, look at how they're named. Then look at the data sent by the browser to the server, see the name/value pairs. Then look at the params, see how RoR uses the names to structure the params. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/A4F3F21A-81ED-41DE-969E-9BF1F2708811%40elevated-dev.com. For more options, visit https://groups.google.com/d/optout.