added model and controler, model should go to services while the controller should go to protocols controller

This commit is contained in:
Žan Žagar 2017-09-12 15:25:22 +02:00
parent fdbae19156
commit 706031dacb

View file

@ -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