Class: Locomotive::Public::ContentEntriesController

Inherits:
BaseController
  • Object
show all
Includes:
Render
Defined in:
app/controllers/locomotive/public/content_entries_controller.rb

Instance Method Summary collapse

Methods included from ActionController::UrlHelpers

#current_site_public_url, #public_page_url, #switch_to_site_url

Methods included from ActionController::SectionHelpers

#sections

Methods included from ActionController::LocaleHelpers

#back_to_default_site_locale, #current_content_locale, #localized?, #set_back_office_locale, #set_current_content_locale, #setup_i18n_fallbacks

Instance Method Details

#createObject



15
16
17
18
19
20
21
22
# File 'app/controllers/locomotive/public/content_entries_controller.rb', line 15

def create
  @entry = @content_type.entries.safe_create(params[:entry] || params[:content])

  respond_with @entry, {
    location:   self.callback_url,
    responder:  Locomotive::ActionController::PublicResponder
  }
end