Hi, I''ve got a checkbox on my form that the user checks to say whether they want to receive a newsletter or not. It looks like this: <form method="post" action=""> <%= check_box :customer, :subscribe_to_newsletter %> <%= submit_tag "Create Customer" %> </form> The subscribe_to_newsletter attribute is not in the database, just a attr_accessor :subscribe_to_newsletter. I need to write a method to show whether this has been checked or not. I believe that if the attribute was in the database, then a question mark method such as subscribe_to_newsletter? would automatically written for me to return true or false. But, it''s not in the database. I''ve written this so far, which works, but is there a better way which I am missing? def receive_newsletter? subscribe_to_newsletter == "1" ? true : false end Thanks, Jord --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---