This repository has been archived by the owner. It is now read-only.
Please sign in to comment.
Remove respond_to :json
Setting the `JackUp.Processor` path to `/assets.json` made it not include the file in the params. Without the `.json`, it correctly saved the Asset record with the attached file, but then returned a 406 "content not acceptable" error since the controller only responds to JSON, and it was processed as HTML. This way it accepts the HTML request and returns JSON to JackUp.
- Loading branch information...
Showing with 4 additions and 5 deletions.
|@@ -1,9 +1,8 @@|
|class AssetsController < ApplicationController|
|- respond_to :json|
|- @asset = Asset.new(file: params[:file])|
|- respond_with @asset|
|+ asset = Asset.new(file: params[:file])|
|+ render json: asset|