From 706031dacb3ffc8e83ec512ba53bbb541bbdc517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDan=20=C5=BDagar?= Date: Tue, 12 Sep 2017 15:25:22 +0200 Subject: [PATCH] added model and controler, model should go to services while the controller should go to protocols controller --- app/controllers/temp_jsons_controller.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 app/controllers/temp_jsons_controller.rb diff --git a/app/controllers/temp_jsons_controller.rb b/app/controllers/temp_jsons_controller.rb new file mode 100755 index 000000000..2839fdd85 --- /dev/null +++ b/app/controllers/temp_jsons_controller.rb @@ -0,0 +1,16 @@ +class TempJsonsController < ApplicationController + + def new + @temp_json=JsonTemp.new + end + def create + @temp_json=JsonTemp.new(temp_params) + json_file_contents=@temp_json.json_file.read + json_object=JSON.parse(json_file_contents) + + end + + def temp_params + params.require(:json_file) + end +end