forked from rails/activeresource
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass the build arguments through to new_element_path.
Failing to do this leads to bad requests for nested element paths so an api with self.site set to be 'foo.com/customers/:customer_id/items/:item_id' will generate the url /customers//items/new.json when Item.build is called and the API returns an error code. If we pass the attributes from build to new_element_path, this behaviour is corrected such that build calls the url: /customers/1/items/new.json
- Loading branch information
1 parent
6639bb4
commit fd3616a
Showing
2 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters