Skip to content
This repository has been archived by the owner on Jan 4, 2021. It is now read-only.

Commit

Permalink
You can have rights which are action only
Browse files Browse the repository at this point in the history
So don't worry if the controller isn't found
  • Loading branch information
mnoack committed Oct 6, 2015
1 parent 3dc18b5 commit cb0e50e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/right_on/right.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ def regular_rights_with_group
else right_name.is_a?(Hash) # controller + actions
controller, actions = right_name.first
r = rights_by_name[controller]
raise right_name.inspect if r.nil?
rights_for_group << r
if r
rights_for_group << r
end
actions.each do |action|
name = "#{controller}##{action}"
r = rights_by_name[name]
Expand Down

0 comments on commit cb0e50e

Please sign in to comment.