John Kopanas
2006-Sep-13 19:15 UTC
check_box, are values saved by default? what type in DB
Are checkboxes saved by default into the DB when you have a field with the same name? I tried with the field as a boolean and then as a string but both times value was not saved. Even though validates_acceptance_of works beautifully. Can anyone share some insight on check_box and rails :-). Thanks. -- John Kopanas john-Iau1QiYlxLpBDgjK7y7TUQ@public.gmane.org http://www.kopanas.com http://www.cusec.net http://www.soen.info --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
John Kopanas
2006-Sep-13 20:57 UTC
Re: check_box, are values saved by default? what type in DB
This is weird. If I take validates_acceptance_of off the checkbox then the value is being passed into the db. Once I put it on the field then null is passed into the DB... even when it passes. Does this make sense to anyone? On 9/13/06, John Kopanas <kopanas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Are checkboxes saved by default into the DB when you have a field with > the same name? I tried with the field as a boolean and then as a > string but both times value was not saved. Even though > validates_acceptance_of works beautifully. > > Can anyone share some insight on check_box and rails :-). > > Thanks. > > -- > John Kopanas > john-Iau1QiYlxLpBDgjK7y7TUQ@public.gmane.org > > http://www.kopanas.com > http://www.cusec.net > http://www.soen.info >-- John Kopanas john-Iau1QiYlxLpBDgjK7y7TUQ@public.gmane.org http://www.kopanas.com http://www.cusec.net http://www.soen.info --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---