Class: ApplicantsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/applicants_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



14
15
16
17
18
19
20
21
22
23
24
# File 'app/controllers/applicants_controller.rb', line 14

def create
  @applicant = Applicant.new(params[:applicant])
  if @applicant.save
    if RefinerySetting.find_or_set(:applicant_recipients, '').present?
      ApplicantMailer.notification(@applicant, request).deliver
    end
    redirect_to thank_you_applicants_url
  else
    render :action => 'new'
  end
end

#newObject



9
10
11
12
# File 'app/controllers/applicants_controller.rb', line 9

def new
  @applicant = Applicant.new
  @applicant.build_answers
end

#thank_youObject



5
6
7
# File 'app/controllers/applicants_controller.rb', line 5

def thank_you
  @page = Page.find_by_link_url('/apply/thank-you', :include => [:parts, :slugs])
end