David wrote: > I have two questions: > > 1. I have a checkbox on a form and after submit I need to check the > status of the checkbox. Any idea how to see what the checkbox is set > to? I am assuming this must be done in the controller or model but > cannot figure it out.
The value of the checkbox will be available in the params hash, just like all the other form fields. > > 2. On load I am checking for a cookie and need to determine if the > checkbox should be checked or unchecked. Is there a way for me to do > this from the controller and actually set the checkbox to checked or > unchecked. If you're using form_for @object, just set the appropriate field in @object in the controller. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---