Class: NormalizerController
- Inherits:
-
ApplicationController
- Object
- ActionController::API
- ApplicationController
- NormalizerController
- Defined in:
- app/controllers/normalizer_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
2 3 4 5 6 7 8 |
# File 'app/controllers/normalizer_controller.rb', line 2 def create input_file = File.open(File.new(params[:file].tempfile)) xml = input_file.read input_file.close normalizer = Stanford::Mods::Normalizer.new render xml: normalizer.normalize_xml_string(xml) end |