Skip to content

Commit

Permalink
add new ArgumentError for not defined user_class in config (Sorcery#82)
Browse files Browse the repository at this point in the history
* add new ArgumentError for not defined user_class in config

* updated grammar
  • Loading branch information
X1ting authored and ebihara99999 committed Mar 10, 2018
1 parent 58d05fd commit b9e70de
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/sorcery/controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ def after_logout!(user)

def user_class
@user_class ||= Config.user_class.to_s.constantize
rescue NameError
raise ArgumentError, 'You have incorrectly defined user_class or have forgotten to define it in intitializer file (config.user_class = \'User\').'
end
end
end
Expand Down

0 comments on commit b9e70de

Please sign in to comment.