search for: belongs_to_current_user

Displaying 1 result from an estimated 1 matches for "belongs_to_current_user".

2007 Dec 06
0
Canceling execution of parent method
I''m trying to write sort of a short-and-sweet authentication permissions system. As it is right now, I know how I think I want it to work but I''m having trouble making it escape the controller action that was running if validation fails. Controller in some action: if belongs_to_current_user?(@article) # User must have permission to edit their own article permission_required("article", "edit") else # User must have permission to edit other''s articles permission_required("article", "edit-a") end...