Class: I18nDashboard::TranslationsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- I18nDashboard::TranslationsController
- Defined in:
- app/controllers/i18n_dashboard/translations_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
10 11 12 13 |
# File 'app/controllers/i18n_dashboard/translations_controller.rb', line 10 def create Translation.create(params[:key], params[:value], params[:locale]) redirect_to root_path, :notice => "Added translations" end |
#destroy ⇒ Object
15 16 17 18 |
# File 'app/controllers/i18n_dashboard/translations_controller.rb', line 15 def destroy Translation.destroy(params[:id]) redirect_to root_path, :notice => "Key deleted" end |
#index ⇒ Object
6 7 8 |
# File 'app/controllers/i18n_dashboard/translations_controller.rb', line 6 def index @translations = Translation.all(params[:query]) end |