Class: Locomotive::ContentAssetsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/locomotive/content_assets_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



11
12
13
14
# File 'app/controllers/locomotive/content_assets_controller.rb', line 11

def create
  @content_asset = current_site.content_assets.create(params[:content_asset])
  respond_with @content_asset
end

#destroyObject



16
17
18
19
20
# File 'app/controllers/locomotive/content_assets_controller.rb', line 16

def destroy
  @content_asset = current_site.content_assets.find(params[:id])
  @content_asset.destroy
  respond_with @content_asset
end

#indexObject



6
7
8
9
# File 'app/controllers/locomotive/content_assets_controller.rb', line 6

def index
  @content_assets = current_site.content_assets
  respond_with(@content_assets)
end