lib/access-granted/role.rb in access-granted-1.3.1 vs lib/access-granted/role.rb in access-granted-1.3.3

- old
+ new

@@ -67,13 +67,10 @@ permission.matches_subject?(subject) end end def prepare_actions(action) - if action == :manage - actions = [:read, :create, :update, :destroy] - else - actions = Array(*[action]) - end + actions = Array(*[action]) + actions.flat_map { |a| a == :manage ? [:create, :read, :update, :destroy ] : [a] } end end end