Class: I18nAdmin::TranslationsController
Instance Method Summary
collapse
#current_locale, #current_user
Instance Method Details
#index ⇒ Object
5
6
7
8
9
10
|
# File 'app/controllers/i18n_admin/translations_controller.rb', line 5
def index
@translations = @translations.search(params[:q]) if params[:q]
@translations = @translations.page(params[:page]).per(60)
@locales = I18n.available_locales
end
|
#update ⇒ Object
12
13
14
15
16
17
18
|
# File 'app/controllers/i18n_admin/translations_controller.rb', line 12
def update
translation = @translations.find(params[:id])
translation.value = translation_params[:value]
I18nAdmin::Translations.update(translation)
render partial: 'translation', locals: { translation: translation }
end
|