How can I achieve granular control over the validation for different
controllers? I create users from an administration controller, but I
don’t want to fill in all their information fields, just have their name
and email address. When they accept the invitation, I want to implement
validation on the other fields.

I have looked at using :on => :update, but I would have to make the user
update all their information on one page. Is there any way to associate
the validation with a controller action?

update all their information on one page. Is there any way to
associate
the validation with a controller action?

Xavier

If I have understood you right, this sounds like a database design
issue. Could you put all the optional data in a separate
user_details table, and set a :has_one relationship in your users class?

Ashley

Or, use one table, but put placeholder values in fields that won’t
validate when empty. You can then detect these placeholders when the
user goes to edit their profile and remove them before displaying the
form for editing. Make sure you use something really strange for the
placeholder, like PLACEHOLDER.

How can I achieve granular control over the validation for different
controllers? I create users from an administration controller, but I
don’t want to fill in all their information fields, just have their name
and email address. When they accept the invitation, I want to implement
validation on the other fields.

I have looked at using :on => :update, but I would have to make the user
update all their information on one page. Is there any way to associate
the validation with a controller action?