Class: Authorio::User
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Authorio::User
- Defined in:
- app/models/authorio/user.rb
Class Method Summary collapse
Class Method Details
.find_by_url!(url) ⇒ Object
8 9 10 |
# File 'app/models/authorio/user.rb', line 8 def find_by_url!(url) find_by_username!(URI(url).path) end |
.find_by_username!(name) ⇒ Object
12 13 14 15 16 |
# File 'app/models/authorio/user.rb', line 12 def find_by_username!(name) return first unless Authorio.configuration.multiuser find_by(username: name) or raise Exceptions::UserNotFound end |