Sha256: fc98e242cfbf625e6e8f60bfab2acf210f5b005a68c8b4101732444628d2c719

Contents?: true

Size: 836 Bytes

Versions: 24

Compression:

Stored size: 836 Bytes

Contents

class ContactController < ApplicationController
  before_filter :get_page

  def index
    @contact = Contact.new
    respond_to do |format|
      format.html { render :template => "pages/show" }
      format.mobile { render :template => "mobile/contact" }
    end
  end

  def submit
    @contact = Contact.new(params[:contact])
    if @contact.valid?
      ContactMailer.contact(@contact).deliver
      flash[:notice] = "Thank you for sending your contact request!"
    else
      flash[:warning] = "There was a problem with your contact submission. Please see error messages below."
    end
    respond_to do |format|
      format.html { render :template => "pages/show" }
      format.mobile { render :template => "mobile/contact" }
    end
  end

  private
    def get_page
      @page = Page.find_by_key('contact-us')
    end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
forge-cli-0.1.10 lib/forge/app/controllers/contact_controller.rb
forge-cli-0.1.9 lib/forge/app/controllers/contact_controller.rb
forge-cli-0.1.8 lib/forge/app/controllers/contact_controller.rb
forge-cli-0.1.7 lib/forge/app/controllers/contact_controller.rb
forge-cli-0.1.6 lib/forge/app/controllers/contact_controller.rb
forge-cli-0.1.5 lib/forge/app/controllers/contact_controller.rb
forge-cli-0.1.4 lib/forge/app/controllers/contact_controller.rb
forge-cli-0.1.3 lib/forge/app/controllers/contact_controller.rb
forge-cli-0.1.2 lib/forge/app/controllers/contact_controller.rb
forge-cli-0.1.1 lib/forge/app/controllers/contact_controller.rb
forge-cli-0.1.0 lib/forge/app/controllers/contact_controller.rb
forge-cli-0.0.18 lib/forge/app/controllers/contact_controller.rb
forge-cli-0.0.17 lib/forge/app/controllers/contact_controller.rb
forge-cli-0.0.16 lib/forge/app/controllers/contact_controller.rb
forge-cli-0.0.15 lib/forge/app/controllers/contact_controller.rb
forge-cli-0.0.14 lib/forge/app/controllers/contact_controller.rb
forge-cli-0.0.13 lib/forge/app/controllers/contact_controller.rb
forge-cli-0.0.12 lib/forge/app/controllers/contact_controller.rb
forge-cli-0.0.11 lib/forge/app/controllers/contact_controller.rb
forge-cli-0.0.10 lib/forge/app/controllers/contact_controller.rb