mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-07 07:26:20 +08:00
16 lines
312 B
Ruby
Executable file
16 lines
312 B
Ruby
Executable file
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
|