Permalink
Browse files

Follow change of user.roles to user.role_symbols

  • Loading branch information...
1 parent 4d54cc6 commit c464788cdbe28d8eaf2280b0fbc29ad25fab1375 @stffn committed Feb 2, 2009
Showing with 4 additions and 2 deletions.
  1. +4 −2 app/models/user.rb
View
@@ -1,6 +1,8 @@
require 'digest/sha1'
class User < ActiveRecord::Base
+ #using_access_control
+
include Authentication
include Authentication::ByPassword
include Authentication::ByCookieToken
@@ -46,8 +48,8 @@ def self.authenticate(login, password)
# The necessary method for the plugin to find out about the role symbols
# Roles returns e.g. [:admin]
- def roles
- r = (super || []).map {|r| r.to_sym}
+ def role_symbols
+ r = (roles || []).map {|r| r.to_sym}
end
# End of declarative_authorization code

0 comments on commit c464788

Please sign in to comment.