module Fullstack::Contacts::Actions
Protected Instance Methods
create_contact!(options = {})
click to toggle source
# File lib/fullstack/contacts/actions.rb, line 12 def create_contact!(options = {}) options = { :failure => "contacts" }.merge(options) @contact = Contact.new(params[:contact]) if @contact.save redirect_to options[:success], :flash => {:notice => t("contacts.success", :default => "Thank you for contacting us")} else render options[:new] end end