Hi,

I'm creating a rails app which requires an authentication system based
on an Access Control List.
Basically I have a User model associated to a Role model where every
user has one and only one role.

The problem I'm facing right now is with the creation of new users and
validation. The role has to change the validation applied to a user
fields on creation (and update), for instance a user having role
"employee" is forced to provide information about its phone number,
while a "manager" doesn't need to provide it.

Is there a clean way to solve this without applying conditions to every
validated field for every role?

Thank you
-- 
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-t...@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