Class: Contact::ContactsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Contact::ContactsController
- Defined in:
- app/controllers/contact/contacts_controller.rb
Instance Method Summary collapse
Instance Method Details
#new ⇒ Object
12 13 14 |
# File 'app/controllers/contact/contacts_controller.rb', line 12 def new @contact_form = Contact::Form.new end |
#send_email ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'app/controllers/contact/contacts_controller.rb', line 16 def send_email @contact_form = Contact::Form.new(params[:contact_form]) if @contact_form.valid? Contact::Mailer.contact_us(@contact_form).deliver redirect_to contact_path, :notice => 'Thank you! Your email has been sent.' else render :new end end |