Skip to content
Browse files

Allow comparisons between roles.

  • Loading branch information...
1 parent c40fcff commit 75f45124ca34deaaff72c8d46d274fa6773a7296 Brady Bouchard committed Sep 17, 2010
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/aegis/role.rb
View
4 lib/aegis/role.rb
@@ -16,6 +16,10 @@ def may_by_default?
def <=>(other)
name <=> other.name
end
+
+ def ==(other)
+ name == other.name && default_permission == other.default_permission
+ end
def to_s
name.to_s.humanize

0 comments on commit 75f4512

Please sign in to comment.
Something went wrong with that request. Please try again.