Class: Locomotive::Api::ContentAssetsController
- Inherits:
-
BaseController
- Object
- ApplicationController
- BaseController
- Locomotive::Api::ContentAssetsController
show all
- Defined in:
- app/controllers/locomotive/api/content_assets_controller.rb
Instance Method Summary
collapse
#back_to_default_site_locale, #current_content_locale, #localized?, #set_back_office_locale, #set_current_content_locale, #setup_i18n_fallbacks
Instance Method Details
#create ⇒ Object
15
16
17
18
19
|
# File 'app/controllers/locomotive/api/content_assets_controller.rb', line 15
def create
@content_asset.from_presenter(params[:content_asset])
@content_asset.save
respond_with @content_asset, location: main_app.locomotive_api_content_assets_url
end
|
#destroy ⇒ Object
27
28
29
30
|
# File 'app/controllers/locomotive/api/content_assets_controller.rb', line 27
def destroy
@content_asset.destroy
respond_with @content_asset
end
|
#index ⇒ Object
7
8
9
|
# File 'app/controllers/locomotive/api/content_assets_controller.rb', line 7
def index
respond_with(@content_assets)
end
|
#show ⇒ Object
11
12
13
|
# File 'app/controllers/locomotive/api/content_assets_controller.rb', line 11
def show
respond_with(@content_asset)
end
|
#update ⇒ Object
21
22
23
24
25
|
# File 'app/controllers/locomotive/api/content_assets_controller.rb', line 21
def update
@content_asset.from_presenter(params[:content_asset])
@content_asset.save
respond_with @content_asset, location: main_app.locomotive_api_content_assets_url
end
|