mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-06 23:15:34 +08:00
added model and controler, model should go to services while the controller should go to protocols controller
This commit is contained in:
parent
fdbae19156
commit
706031dacb
1 changed files with 16 additions and 0 deletions
16
app/controllers/temp_jsons_controller.rb
Executable file
16
app/controllers/temp_jsons_controller.rb
Executable 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
|
Loading…
Reference in a new issue