Class: Superconductor::FileController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Superconductor::FileController
- Defined in:
- app/controllers/file_controller.rb
Instance Method Summary collapse
Instance Method Details
#update ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'app/controllers/file_controller.rb', line 3 def update @file = File.open(params[:file],'w') @file.puts(params[:content]) @file.close respond_to do |format| format.json { render json: nil, status: :ok } end end |