Resting Pug logo Resting Pug

Description

Updates a subject by id with attributes from params and returns it

Example

Request:
PATCH http://your.awesome/api/books/1
{
  "name": "The Green Mile",
}

Response:
200 OK
{
  "book": {
    "id": 1,
    "name": "The Green Mile",
    "author": "Stephen King"
  }
}

How to customize

Use

Source code

# lib/resting_pug/actions.rb

def update
  run_chain(update_chain)
end
Find me on GitHub