Class: Papercat::Api::ImagesController
- Inherits:
-
Papercat::ApplicationController
- Object
- ActionController::Base
- Papercat::ApplicationController
- Papercat::Api::ImagesController
- Defined in:
- app/controllers/papercat/api/images_controller.rb
Instance Method Summary collapse
Methods inherited from Papercat::ApplicationController
Instance Method Details
#create ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'app/controllers/papercat/api/images_controller.rb', line 10 def create @record = Image.new(file: params[:file]) if @record.save render(json: @record.as_json) else render(json: @record.errors) end end |