Files
dunlop-core/spec/dummy/app/models/user.rb
T
2018-01-20 13:02:44 -03:00

18 lines
505 B
Ruby

class User < ApplicationRecord
include Dunlop::UserModel
attr_accessor :my_domain # used for advanced authorization testing
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, #:registerable, :trackable,
:recoverable, :rememberable, :validatable
scope :active, ->{ all }
class << self
def for_domain(domain)
where.not(email: 'outside-domain@example.com')
end
end
end