Sha256: 2d884c39c1ef3d0f3f38aef158473844c570ac4e7d2e21e442ee6cff2c4044a3
Contents?: true
Size: 664 Bytes
Versions: 9
Compression:
Stored size: 664 Bytes
Contents
class ContactUs::ContactsController < ApplicationController def create @contact = ContactUs::Contact.new(params[:contact_us_contact]) if @contact.save redirect_to(ContactUs.success_redirect || '/', :notice => t('contact_us.notices.success')) else flash[:error] = t('contact_us.notices.error') render_new_page end end def new @contact = ContactUs::Contact.new render_new_page end protected def render_new_page case ContactUs.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
9 entries across 9 versions & 1 rubygems