rails/activeresource — pull request #43 by seanhandley (2012-10-19 09:33:19+00:00)
Title: Pass the build arguments through to new_element_path.

Failing to pass the attributes to new_element_path in the self.build method leads to bad requests for nested element paths.

For example, 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 as a result.

If we pass the attributes from self.build through to new_element_path, this behaviour is corrected and build uses the correct url to initialise the empty ActiveResource object.

/customers/1/items/new.json