Class: Locomotive::Api::TranslationsController
- Inherits:
-
BaseController
- Object
- ApplicationController
- BaseController
- Locomotive::Api::TranslationsController
show all
- Defined in:
- app/controllers/locomotive/api/translations_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
|
# File 'app/controllers/locomotive/api/translations_controller.rb', line 15
def create
@translation.save
respond_with @translation, :location => main_app.locomotive_api_translation_path(@translation)
end
|
#destroy ⇒ Object
25
26
27
28
|
# File 'app/controllers/locomotive/api/translations_controller.rb', line 25
def destroy
@translation.destroy
respond_with @translation
end
|
#index ⇒ Object
7
8
9
|
# File 'app/controllers/locomotive/api/translations_controller.rb', line 7
def index
respond_with(@translations)
end
|
#show ⇒ Object
11
12
13
|
# File 'app/controllers/locomotive/api/translations_controller.rb', line 11
def show
respond_with @translation
end
|
#update ⇒ Object
20
21
22
23
|
# File 'app/controllers/locomotive/api/translations_controller.rb', line 20
def update
@translation.update_attributes(params[:translation])
respond_with @translation, :location => main_app.locomotive_api_translation_path(@translation)
end
|