Thursday, November 5, 2009

[Rails] Re: Confirmation Checkboxes - any good ideas?

Denis Haskin wrote:
> My approach on things like this has been to add the attribute to the
> model with attr_accessor, and then setting up whatever validations I
> need. E.g.
>
> attr_accessor :terms_of_service
>
> validates_acceptance_of :terms_of_service
>
> Seems to work fine (I've had issues where I've been passing such a model
> along a multi-action process by storing it in the session, though).
>
> (Still not sure from a business/legal sense why you wouldn't need these
> to be persistent attributes, however)

Agreed on all counts. Booleans are cheap, and you probably want to
store something that proves acceptance.

>
> dwh

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen@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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate