Hello,

I have this situation:

1. User which have cis_id, sms_id, provider_id and role_id
2. Sms, Cis and Provider which have many Users associated

I setted associations on models and now i need to set the sms_id, cis_id or
provider_id on user when I create one of those models. That's works by
default on AS, but I need to set role_id also for each situation. Example:

When I create new Sms with 3 users associated, then set sms_id (default) and
set role_id to 1
When I create new Cis with 2 users associated, then set cis_id and set
role_id to 2

I tryed to use before_create/update_save but the user validation fails on
user because that is called after validation and I don't setted the role_id
(user model validate that). Suggestions?


Thank you

-- 
Regards,

Gabriel Sobrinho
+55 31 8775 8378

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to