app/models/user.rb in refinerycms-authentication-0.9.9.4 vs app/models/user.rb in refinerycms-authentication-0.9.9.5

- old
+ new

@@ -52,9 +52,9 @@ roles << Role[title] unless has_role?(title) end def has_role?(title) raise ArgumentException, "Role should be the title of the role not a role object." if title.is_a?(Role) - (role = Role.find_by_title(title.to_s.camelize)).present? and roles.collect{|r| r.id}.include?(role.id) + roles.any?{|r| r.title == title.to_s.camelize} end end