Sending raw JSON data to a member action in a controller spec

Updated . Posted . Visible to the public.

This is what worked for me in a Rails 4:

# JSON data as first argument, then parameters
patch :update, { some: 'data' }.to_json, id: id, format: :json
Last edit
Andreas Robecke
License
Source code in this card is licensed under the MIT License.
Posted to makandra dev (2014-10-22 09:13)