Class: InquiriesController
Instance Method Summary
collapse
#admin?, #error_404, #from_dialog?, #home_page?, #just_installed?, #local_request?, #wymiframe
Methods included from Crud
append_features
Instance Method Details
#create ⇒ Object
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'vendor/plugins/inquiries/app/controllers/inquiries_controller.rb', line 13
def create
@inquiry = Inquiry.new(params[:inquiry])
if @inquiry.save
begin
InquiryMailer.deliver_notification(@inquiry, request)
rescue
logger.warn "There was an error delivering an inquiry notification.\n#{$!}\n"
end
begin
InquiryMailer.deliver_confirmation(@inquiry, request)
rescue
logger.warn "There was an error delivering an inquiry confirmation:\n#{$!}\n"
end
redirect_to thank_you_inquiries_url
else
render :action => 'new'
end
end
|
#new ⇒ Object
9
10
11
|
# File 'vendor/plugins/inquiries/app/controllers/inquiries_controller.rb', line 9
def new
@inquiry = Inquiry.new
end
|
#thank_you ⇒ Object
5
6
7
|
# File 'vendor/plugins/inquiries/app/controllers/inquiries_controller.rb', line 5
def thank_you
@page = Page.("^/inquiries/thank_you$", :include => [:parts, :slugs])
end
|