Please sign in to comment.
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...
Showing with 15 additions and 1 deletion.