Class: QuotesController

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

Instance Method Summary collapse

Instance Method Details

#createObject



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

def create
  @quote = Quote.new params[:quote]
  if @quote.save
    QuoteMailer.notification(@quote, request).deliver
    redirect_to thank_you_quotes_url
  else
    render :new
  end
end

#newObject



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

def new
  @quote = Quote.new
end

#thank_youObject



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

def thank_you
  @page = Page.find_by_link_url("/quotes/thank_you", :include => [:parts, :slugs])
end