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



16
17
18
19
# File 'app/controllers/locomotive/translations_controller.rb', line 16

def edit
  authorize @translation
  respond_with @translation
end

#indexObject



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

#updateObject



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