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

Fix multiple parameters injection on URL #27

Closed victor-am closed 5 years ago

victor-am commented 5 years ago

Description

Reported on issue #26

api.get('/some_path/:foo/:bar', { foo: 1, bar: 2 })

// Expected result
// => Request to /some_path/1/2

// Result before the fix
// => Request to /some_path/:foo/2

This PR fixes the current behavior to comply with the expected result 😄