Class: Recruiter::JobDecorator

Inherits:
Draper::Decorator
  • Object
show all
Includes:
PublicableDecoratorHelper
Defined in:
app/decorators/recruiter/job_decorator.rb

Instance Method Summary collapse

Methods included from PublicableDecoratorHelper

#created_at_ago, #publication, #published_at, #updated?, #updated_at, #updated_at_ago

Instance Method Details

#cityObject



11
12
13
# File 'app/decorators/recruiter/job_decorator.rb', line 11

def city
  object.city.name
end

#locationObject



19
20
21
# File 'app/decorators/recruiter/job_decorator.rb', line 19

def location
  "#{city}/#{short_state}"
end

#short_stateObject



23
24
25
# File 'app/decorators/recruiter/job_decorator.rb', line 23

def short_state
  object.city.state.short
end

#stateObject



15
16
17
# File 'app/decorators/recruiter/job_decorator.rb', line 15

def state
  object.city.state.name
end

#tag_namesObject



27
28
29
# File 'app/decorators/recruiter/job_decorator.rb', line 27

def tag_names
  tags.map(&:name)
end

#titleObject



7
8
9
# File 'app/decorators/recruiter/job_decorator.rb', line 7

def title
  object.title.titleize
end