Class: Translations::TranslationsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/translations/translations_controller.rb

Instance Method Summary collapse

Instance Method Details

#newObject



4
5
6
7
8
# File 'app/controllers/translations/translations_controller.rb', line 4

def new
  params[:value] = nil if params[:value].empty?
  I18n.backend.store_translations params[:locale], {params[:key] => params[:value]}, {:escape => false}
  render :text => 'ok', :content_type => "text/plain"
end