Class: Rosette::TranslationsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/rosette/translations_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



6
7
8
9
10
11
12
13
# File 'app/controllers/rosette/translations_controller.rb', line 6

def create
  available_locales.each { |locale, translation| Manager.create(locale, key, translation) }

  redirect_to redirect_path, notice: "Translation(s) added"
rescue StandardError => e
  @error_message = e.message
  render_rosette_new(key, redirect_path)
end