Class: FrontEnd::EnquiriesController
- Inherits:
-
MainApplicationController
- Object
- MainApplicationController
- FrontEnd::EnquiriesController
- Defined in:
- app/controllers/c/front_end/enquiries_controller.rb
Instance Method Summary collapse
Instance Method Details
permalink #create ⇒ Object
[View source]
11 12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/c/front_end/enquiries_controller.rb', line 11 def create get_page C::Page, 'contact-us' @enquiry = C::Enquiry.new(enquiry_params) if @enquiry.save C::EnquiriesMailer.new_enquiry(@enquiry).deliver_now redirect_to thanks_front_end_enquiries_path else render :new end end |
permalink #new ⇒ Object
[View source]
6 7 8 9 |
# File 'app/controllers/c/front_end/enquiries_controller.rb', line 6 def new get_page C::Page, 'contact-us' @enquiry = C::Enquiry.new end |
permalink #thanks ⇒ Object
[View source]
22 23 24 |
# File 'app/controllers/c/front_end/enquiries_controller.rb', line 22 def thanks @enquiry = C::Enquiry.new end |