Class: Locomotive::TranslationsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/locomotive/translations_controller.rb

Instance Method Summary collapse

Methods included from Concerns::UrlHelpersController

#current_site_public_url, #public_page_url

Instance Method Details

#editObject



14
15
16
17
# File 'app/controllers/locomotive/translations_controller.rb', line 14

def edit
  authorize @translation
  respond_with @translation
end

#indexObject



8
9
10
11
12
# File 'app/controllers/locomotive/translations_controller.rb', line 8

def index
  authorize ThemeAsset
  @translations = service.all(params.slice(:page, :per_page, :q, :filter_by))
  respond_with @translations
end

#updateObject



19
20
21
22
23
# File 'app/controllers/locomotive/translations_controller.rb', line 19

def update
  authorize @translation
  service.update(@translation, translation_params[:values])
  respond_with @translation, location: translations_path(current_site, params[:_location])
end