Module: RocketCMS::Controllers::Contacts
- Extended by:
- ActiveSupport::Concern
- Included in:
- ContactsController
- Defined in:
- lib/rocket_cms/controllers/contacts.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/rocket_cms/controllers/contacts.rb', line 10 def create @contact_message = ContactMessage.new() after_initialize if RocketCMS.configuration.contacts_captcha meth = :save_with_captcha else meth = :save end if @contact_message.send(meth) after_create redirect_to :contacts_sent else flash.now[:alert] = @contact_message.errors..join("\n") render action: "new" end end |
#new ⇒ Object
5 6 7 8 |
# File 'lib/rocket_cms/controllers/contacts.rb', line 5 def new @contact_message = ContactMessage.new after_initialize end |
#sent ⇒ Object
27 28 |
# File 'lib/rocket_cms/controllers/contacts.rb', line 27 def sent end |