Class: ContactsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
lib/generators/pixelforce_cms/templates/contacts_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



7
8
9
10
11
12
13
14
# File 'lib/generators/pixelforce_cms/templates/contacts_controller.rb', line 7

def create
  @contact_us = ContactUs.new params[:contact_us]
  if @contact_us.save
    redirect_to contact_path
  else
    render action: :new
  end
end

#newObject



3
4
5
# File 'lib/generators/pixelforce_cms/templates/contacts_controller.rb', line 3

def new
  @contact_us = ContactUs.new
end