Sha256: bd4e5b2bba1bcd1bb1a3131affc4c5d414af4561898af5b78980f0cfc1f3a40f

Contents?: true

Size: 271 Bytes

Versions: 50

Compression:

Stored size: 271 Bytes

Contents

class User < ActiveRecord::Base
  has_many :articles

  has_secure_password

  before_save :create_remember_token

  def self.human_name
    model_name.i18n_key
  end

  private

  def create_remember_token
    self.remember_token = SecureRandom.urlsafe_base64
  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
adeia-1.0.0 spec/test_app/app/models/user.rb
adeia-0.15.4 spec/test_app/app/models/user.rb
adeia-0.15.3 spec/test_app/app/models/user.rb
adeia-0.15.2 spec/test_app/app/models/user.rb
adeia-0.15.1 spec/test_app/app/models/user.rb
adeia-0.15.0 spec/test_app/app/models/user.rb
adeia-0.14.0 spec/test_app/app/models/user.rb
adeia-0.13.1 spec/test_app/app/models/user.rb
adeia-0.13.0 spec/test_app/app/models/user.rb
adeia-0.12.0 spec/test_app/app/models/user.rb
adeia-0.11.11 spec/test_app/app/models/user.rb
adeia-0.11.10 spec/test_app/app/models/user.rb
adeia-0.11.9 spec/test_app/app/models/user.rb
adeia-0.11.8 spec/test_app/app/models/user.rb
adeia-0.11.7 spec/test_app/app/models/user.rb
adeia-0.11.6 spec/test_app/app/models/user.rb
adeia-0.11.5 spec/test_app/app/models/user.rb
adeia-0.11.4 spec/test_app/app/models/user.rb
adeia-0.11.3 spec/test_app/app/models/user.rb
adeia-0.11.2 spec/test_app/app/models/user.rb