Sha256: d500309dc11bb1b9f6f7059916221a660b84967678dd0264d419b3bfbc412298

Contents?: true

Size: 428 Bytes

Versions: 11

Compression:

Stored size: 428 Bytes

Contents

class User < ApplicationRecord
  attr_accessor :admin
  # Include default devise modules. Others available are:
  # :confirmable, :lockable, :timeoutable, :trackable and :omniauthable
  devise :database_authenticatable, :registerable,
         :recoverable, :rememberable, :validatable

  def admin?
    true
  end

  def ban!
    update_columns(is_baned: true)
  end

  def unban!
    update_columns(is_baned: false)
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
censor_bear-0.1.29 test/dummy/app/models/user.rb
censor_bear-0.1.28 test/dummy/app/models/user.rb
censor_bear-0.1.27 test/dummy/app/models/user.rb
censor_bear-0.1.26 test/dummy/app/models/user.rb
censor_bear-0.1.25 test/dummy/app/models/user.rb
censor_bear-0.1.24 test/dummy/app/models/user.rb
censor_bear-0.1.23 test/dummy/app/models/user.rb
censor_bear-0.1.22 test/dummy/app/models/user.rb
censor_bear-0.1.21 test/dummy/app/models/user.rb
censor_bear-0.1.20 test/dummy/app/models/user.rb
censor_bear-0.1.19 test/dummy/app/models/user.rb