search for: new_user_role_path

Displaying 2 results from an estimated 2 matches for "new_user_role_path".

2010 Oct 27
0
Help with routes
...e (clearance) <- role type arrangement where: User has_many :roles, :through => :clearances has_many :clearances Clearance belongs_to :role belongs_to :user and Role has_many :users, :through => :clearances has_many :clearances What I am trying to do is to link through new_user_role_path(@user). But I get the following error when I try: ActionController::RoutingError: No route matches {:action=>"new", :controller=>"user_roles"} The thing is that when I run rake routes I see this: new_user_role GET /users/:user_id/role/new(.:format)...
2010 Jan 21
2
nested forms and attr_accessable
Rails 2.3.5 I am working on a nested form that assigns roles to users through a table called clearances. I have attr_acessable turned off globally in an initializer: ActiveRecord::Base.send(:attr_accessible, nil) I have this set in clearance.rb attr_accessible(:description, :effective_from, :role_id, :superceded_after, :user_id) And this is what params looks like after the