victor-am / rails-ranger

🤠 An opinionated AJAX client for Ruby on Rails APIs
https://victor-am.github.io/rails-ranger/
MIT License
32 stars 5 forks source link

Weird behavior with update params #10

Closed victor-am closed 7 years ago

victor-am commented 7 years ago

I didn't had the time to investigate deeper, but the following is happening:

👍 Works fine

api.update('characters', { id: 1 })

❌ Doesn't work

api.update('characters', { id: 1, character: { firstName: 'John' } })

The second scenario tries tries to request the /characters/:id URL (seems like it didn't replace the :id with the given id).

victor-am commented 7 years ago

Fixed on 9600fb5e28a59abad8a8d7e7ced2b93a34b10aa9