Sha256: aee5f75fcd9630014bf9d691c62a5f8f289bd64efc1ad67cef274fae29bb1d88

Contents?: true

Size: 347 Bytes

Versions: 9

Compression:

Stored size: 347 Bytes

Contents

module Spina
  class User < ApplicationRecord
    include Gravatar
    
    has_secure_password
    has_secure_token :password_reset_token

    validates :name, presence: true
    validates :email, uniqueness: true, presence: true, format: { with:/\A[^@]+@[^@]+\z/ }

    def admin?
      admin
    end

    def to_s
      name
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
spina-2.3.5 app/models/spina/user.rb
spina-2.3.4 app/models/spina/user.rb
spina-2.3.3 app/models/spina/user.rb
spina-2.3.2 app/models/spina/user.rb
spina-2.3.1 app/models/spina/user.rb
spina-2.3.0 app/models/spina/user.rb
spina-2.2.0 app/models/spina/user.rb
spina-2.1.1 app/models/spina/user.rb
spina-2.1.0 app/models/spina/user.rb