Class: Locomotive::TranslationsController
Instance Method Summary
collapse
#require_ssl
#current_site_public_url, #public_page_url, #switch_to_site_url
#sections
#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
18
19
20
21
|
# File 'app/controllers/locomotive/translations_controller.rb', line 18
def create
@translation = current_site.translations.create(params[:translation])
respond_with @translation, location: translations_path
end
|
#destroy ⇒ Object
33
34
35
36
37
|
# File 'app/controllers/locomotive/translations_controller.rb', line 33
def destroy
@translation = current_site.translations.find(params[:id])
@translation.destroy
respond_with @translation, location: translations_path
end
|
#edit ⇒ Object
23
24
25
|
# File 'app/controllers/locomotive/translations_controller.rb', line 23
def edit
respond_with @translation
end
|
#index ⇒ Object
8
9
10
11
|
# File 'app/controllers/locomotive/translations_controller.rb', line 8
def index
@translations = current_site.translations.ordered.page(params[:page]).per(Locomotive.config.ui[:per_page])
respond_with @translations
end
|
#new ⇒ Object
13
14
15
16
|
# File 'app/controllers/locomotive/translations_controller.rb', line 13
def new
@translation = current_site.translations.build
respond_with @translation
end
|
#update ⇒ Object
27
28
29
30
31
|
# File 'app/controllers/locomotive/translations_controller.rb', line 27
def update
@translation = current_site.translations.find(params[:id])
@translation.update_attributes(params[:translation])
respond_with @translation, location: translations_path
end
|