app/controllers/lolita/i18n_controller.rb in lolita-i18n-0.3.0 vs app/controllers/lolita/i18n_controller.rb in lolita-i18n-0.3.1

- old
+ new

@@ -9,10 +9,16 @@ end def update respond_to do |format| format.json do - render :nothing => true, :json => {error: !Lolita::I18n::Backend.set(params[:id],params[:translation])} + error = false + begin + Lolita::I18n::Backend.set(params[:id],params[:translation]) + rescue Lolita::I18n::Exceptions::MissingInterpolationArgument => e + error = e.to_s + end + render :nothing => true, :json => {error: error} end end end private \ No newline at end of file