Class: Avocado::AvocadoController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Avocado::AvocadoController
- Defined in:
- app/controllers/avocado/avocado_controller.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
4 5 6 7 |
# File 'app/controllers/avocado/avocado_controller.rb', line 4 def create File.open(json, 'w+:UTF-8') { |f| f.write params[:file].read } head :ok end |
#index ⇒ Object
9 10 11 12 |
# File 'app/controllers/avocado/avocado_controller.rb', line 9 def index @data = File.read(json) render '/template' end |