Method: CopycatTranslationsController#upload
- Defined in:
- app/controllers/copycat_translations_controller.rb
#upload ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 |
# File 'app/controllers/copycat_translations_controller.rb', line 45 def upload begin CopycatTranslation.import_yaml(params["file"].tempfile) rescue Exception => e logger.info "\n#{e.class}\n#{e.}" flash[:notice] = "There was an error processing your upload!" render :action => 'import_export', :status => 400 else redirect_to copycat_translations_path, :notice => "YAML file uploaded successfully!" end end |