Displaying 1 result from an estimated 1 matches for "permission_requir".
Did you mean:
permission_required
2007 Dec 06
0
Canceling execution of parent method
...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
Application controller:
# Denies access to unauthorized users.
def permission_required(cont,...