Class: Externals::Company

Inherits:
ApplicationRecord show all
Includes:
IdentityCache
Defined in:
app/models/externals/company.rb

Overview

typed: ignore

Schema Information

Table name: externals_companies

id               :integer          not null, primary key
name             :string(191)
email_domain     :string(191)
point_multiplier :integer
logo_url         :string(191)
created_at       :datetime         not null
updated_at       :datetime         not null

Instance Method Summary collapse

Methods inherited from ApplicationRecord

sync_carrierwave_url

Instance Method Details

#unverified_usersObject



28
29
30
# File 'app/models/externals/company.rb', line 28

def unverified_users
  User.where(externals_company_id: nil).where('email LIKE ?', "%#{email_domain}")
end

#verified_usersObject



24
25
26
# File 'app/models/externals/company.rb', line 24

def verified_users
  User.where(externals_company_id: id).where('email LIKE ?', "%#{email_domain}")
end