Sha256: 597c1bbf3e0a83b82cef68b6150192a8fa6ee3bbcc97de9dc1dbdfd14b067105
Contents?: true
Size: 662 Bytes
Versions: 1
Compression:
Stored size: 662 Bytes
Contents
class ContactUsWebsite::ContactsController < ApplicationController def create @contact = ContactUsWebsite::Contact.new(params[:contact_us_contact]) if @contact.save redirect_to('/', :notice => t('contact_us.notices.success')) else flash[:error] = t('contact_us.notices.error') render_new_page end end def new @contact = ContactUsWebsite::Contact.new render_new_page end protected def render_new_page case ContactUsWebsite.form_gem when 'formtastic' then render 'new_formtastic' when 'simple_form' then render 'new_simple_form' else render 'new' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
contact_us_website-0.4.4.beta | app/controllers/contact_us/contacts_controller.rb |