Skip to content

Commit

Permalink
Reuse #role? method from User model (#1391)
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez authored and josepjaume committed May 23, 2017
1 parent 7923248 commit a5584e3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class SessionsController < ::Devise::SessionsController

def after_sign_in_path_for(user)
return first_login_authorizations_path if first_login_and_not_authorized?(user) &&
!user.roles.include?("admin")
!user.role?("admin")
super
end

Expand Down

0 comments on commit a5584e3

Please sign in to comment.