Class: InplaceI18n::TranslationsController

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

Instance Method Summary collapse

Instance Method Details

#showObject



6
7
8
9
# File 'app/controllers/inplace_i18n/translations_controller.rb', line 6

def show
  value = Translation.all(@language).find_by_path(params[:path])
  render :text => value
end

#updateObject



11
12
13
14
15
# File 'app/controllers/inplace_i18n/translations_controller.rb', line 11

def update
  Translation.update_by_path(@language, params[:path], params[:value])
  I18n.reload!
  render :text => "OK"
end