> Instead, you could have a state column, and apply validations based on
> that state. When the accounts controller creates a user, it sets its
> state to (for example) signed_up, and that state requires all your
> validation, whereas in the second case the controller could set the
> state to 'invited', which has a separate set of validations. (if you
> do go down this route, the aasm gem can help you manage states and the
> transitions between them)

Ok, let's say I do add a state column. How would I setup the validation, 
you mean, in the model check the state and apply validation according to 
the state?

Would you recommend I set the state column...
1) as string or
2) as a foreign key to a states tables that lists the states?

-- 
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.

Reply via email to