Form is creating already loaded attributes in addition to new attributes, how do I ignore the first?
- by looloobs
In my application you:
Have an admin user that signs on and that user has a role (separate model), then I use the declarative_authorization plugin to give access to certain areas.
That admin user can also register new users in the system, when they do this (using Authlogic) they fill out a nested form that includes that new users' role.
So what is happening is the role of the admin user is being loaded by the declarative_authorization and then the nested form using the has_many_nested_attributes is loading that existing role as well as the new role for the new user (users can have many roles).
Is there some way I can tell the new User being created to ignore the role assigned to the current_user and only create the role in the form for the new user?
I have looked through a lot of different things, but it seems to get more complicated that these are nested attributes.
Thanks in advance.