search for: new_rol

Displaying 4 results from an estimated 4 matches for "new_rol".

Did you mean: new_col
2006 Apr 05
1
Validation error messages help please
I''m having problems with validation error messages appearing in my app. In Controller: def permissions @roles = Role.find(:all, :order => ''name'') end def new_role @role = Role.create(params[:role]) if request.post? and @role.save flash[''notice''] = ''Successfully created a new Role'' redirect_to :action => "permissions" else flash[''notice''] = ''The Role...
2012 Jan 18
2
Polymorphic and standard association issue
Hello all, I''m having a strange issue with a model that belongs_to two other models. The one association is polymorphic and the other is normal. ================================ class Role < ActiveRecord::Base belongs_to :user belongs_to :permission, :polymorphic => true end class User < ActiveRecord::Base has_many :roles has_many :programs, :through => :roles end
2006 Apr 04
3
Forms, view & AJAX best practice help
...gle textfield. Also on the page I have a dropdown list of roles and then underneath that a div that contains a list of permissions for the role selected in the dropdown. I have a link that when clicked makes the hidden form div visible. What I would like is for the form to submit via AJAX to a new_role controller method. Any errors would be highlighted in my "error_messages_for ''role''" call at the top of the permissions.rhtml file. When it has submitted correctly the dropdown list would be updated with the new selection. What I have got so far is that the page wa...
2010 Feb 16
0
Strange routing(?) Issue
...role_users GET /roles/:role_id/ users(.:format) {:action=>"index", :controller=>"users"} POST /roles/:role_id/ users(.:format) {:action=>"create", :controller=>"users"} new_role_user GET /roles/:role_id/users/ new(.:format) {:action=>"new", :controller=>"users"} edit_role_user GET /roles/:role_id/users/:id/ edit(.:format) {:action=>"edit", :controller=>"users"}...