36 lines
761 B
Ruby
36 lines
761 B
Ruby
class EmployerProfile
|
|
include Mongoid::Document
|
|
include Mongoid::Timestamps
|
|
|
|
field :company_name, localize: true
|
|
field :contact_person, localize: true
|
|
field :office_address, localize: true
|
|
field :company_profile, localize: true
|
|
field :website
|
|
field :country
|
|
field :state
|
|
field :city
|
|
field :zipcode
|
|
field :country_code
|
|
field :phone_number
|
|
field :mobile_number
|
|
field :industry
|
|
|
|
mount_uploader :avatar, ImageUploader
|
|
|
|
belongs_to :recruit_profile
|
|
has_many :recruitment_jobs, :dependent => :destroy
|
|
|
|
def get_avatar
|
|
if self.avatar.url.nil?
|
|
return "/assets/person.png"
|
|
else
|
|
return self.avatar.url
|
|
end
|
|
end
|
|
|
|
def get_industry
|
|
RecruitmentIndustry.find(self.industry).industry_title rescue ""
|
|
end
|
|
|
|
end |