Skip to content

Commit

Permalink
Ensure registered roles are unique
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmypoulsen committed Dec 16, 2024
1 parent b9d7ee3 commit 105e5b2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/pundit_role_play.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ def self.roles

def self.register_role(name)
roles << name unless name == "ApplicationRole"
roles.uniq!
end
end

0 comments on commit 105e5b2

Please sign in to comment.