Class: User
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- User
- Defined in:
- lib/generators/rails_jwt_api/templates/user.rb
Constant Summary collapse
- EMAIL_REGEX =
/\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
Instance Method Summary collapse
-
#details ⇒ Object
validates :name, presence: true, length: 3, maximum: 25 validates :username, presence: true,length:3, maximum: 25.
Instance Method Details
#details ⇒ Object
validates :name, presence: true, length: 3, maximum: 25 validates :username, presence: true,length:3, maximum: 25
8 9 10 |
# File 'lib/generators/rails_jwt_api/templates/user.rb', line 8 def details as_json(only: [:id, :email,:created_at]) end |