Class: I18nDashboard::TranslationsController
Instance Method Summary
collapse
i18n_dashboard_authenticate, i18n_dashboard_conf
Instance Method Details
#create ⇒ Object
12
13
14
15
|
# File 'app/controllers/i18n_dashboard/translations_controller.rb', line 12
def create
Translation.create(params[:key], params[:value], params[:locale])
redirect_to i18n_dashboard_root_path, :notice => "Added translations"
end
|
#destroy ⇒ Object
17
18
19
20
|
# File 'app/controllers/i18n_dashboard/translations_controller.rb', line 17
def destroy
Translation.destroy(params[:id])
redirect_to i18n_dashboard_root_path, :notice => "Key deleted"
end
|
#index ⇒ Object
8
9
10
|
# File 'app/controllers/i18n_dashboard/translations_controller.rb', line 8
def index
@translations = Translation.all(params[:query])
end
|