Skip to content

Commit

Permalink
more verbose exception on role-not-found
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Fuchs committed Jul 17, 2008
1 parent da82c3c commit 8ccdbd5
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -34,7 +34,7 @@ def role_authorizing(action, type = nil)
type ||= self.class.name.demodulize.downcase.to_sym
role = permissions[type][action] if respond_to?(:permissions) && permissions[type]
returning Role.build(role, self) || owner && owner.role_authorizing(action, type) do |role|
raise "could not find role for #{type}: #{action}" unless role
raise "could not find role for #{type}: #{action} (on: #{self.inspect})" unless role
role.original_context = self
end
end
Expand Down

0 comments on commit 8ccdbd5

Please sign in to comment.