Class: SimpleFormAttachments::UploadController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- SimpleFormAttachments::UploadController
- Defined in:
- app/controllers/simple_form_attachments/upload_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
10 11 12 13 14 |
# File 'app/controllers/simple_form_attachments/upload_controller.rb', line 10 def create @attachment = res = @attachment.save render json: { html: (@attachment) }, status: (res ? :ok : :unprocessable_entity) end |
#show ⇒ Object
5 6 7 8 |
# File 'app/controllers/simple_form_attachments/upload_controller.rb', line 5 def show @attachment = .find(params[:id]) render json: { html: (@attachment) }, status: :ok end |