Class: Locomotive::TranslationsController
- Inherits:
-
BaseController
- Object
- ApplicationController
- BaseController
- Locomotive::TranslationsController
- Defined in:
- app/controllers/locomotive/translations_controller.rb
Instance Method Summary collapse
Instance Method Details
#bulk_destroy ⇒ Object
27 28 29 30 31 |
# File 'app/controllers/locomotive/translations_controller.rb', line 27 def bulk_destroy Translation, :destroy? service.bulk_destroy(params[:ids].split(',')) respond_with current_site, location: translations_path(current_site, translation_nav_params) end |
#edit ⇒ Object
16 17 18 19 |
# File 'app/controllers/locomotive/translations_controller.rb', line 16 def edit @translation respond_with @translation end |
#index ⇒ Object
10 11 12 13 14 |
# File 'app/controllers/locomotive/translations_controller.rb', line 10 def index 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 @translation service.update(@translation, translation_params[:values].to_h) respond_with @translation, location: translations_path(current_site, translation_nav_params) end |