Class: Locomotive::TranslationsController
Instance Method Summary
collapse
#current_site_public_url, #public_page_url
Instance Method Details
#edit ⇒ Object
16
17
18
19
|
# File 'app/controllers/locomotive/translations_controller.rb', line 16
def edit
authorize @translation
respond_with @translation
end
|
#index ⇒ Object
10
11
12
13
14
|
# File 'app/controllers/locomotive/translations_controller.rb', line 10
def index
authorize Translation
@translations = service.all(params.slice(:page, :per_page, :q, :filter_by))
respond_with @translations
end
|
#update ⇒ Object
21
22
23
24
25
|
# File 'app/controllers/locomotive/translations_controller.rb', line 21
def update
authorize @translation
service.update(@translation, translation_params[:values].to_h)
respond_with @translation, location: translations_path(current_site, translation_nav_params)
end
|