Repository navigation
Honor site path for has_one associations. - #333
elbowdonkey wants to merge 3 commits into
Conversation
|
This issue has been automatically marked as stale because it has not been commented on for at least three months. If it is an issue and you can still reproduce this error on the If it is a pull request and you are still interested on having it merged please make sure it can be merged clearly. Thank you for all your contributions. |
|
All of the above is still relevant and likely mergeable. Perhaps it'd be a good idea to increase the span of time rails-bot marks things as stale? |
|
This issue has been automatically marked as stale because it has not been commented on for at least three months. If it is an issue and you can still reproduce this error on the If it is a pull request and you are still interested on having it merged please make sure it can be merged clearly. Thank you for all your contributions. |
| def test_has_one_finder_uses_site_path | ||
| ShippingLabel.site = "http://37s.sunrise.i:3000/api/v1" | ||
| Order.site = "http://37s.sunrise.i:3000/api/v1" | ||
| Order.send(:has_one, :shipping_label) |
There was a problem hiding this comment.
This is changing the global state so I think we should move all those calls to the class definition in the fixtures
|
This issue has been automatically marked as stale because it has not been commented on for at least three months. If it is an issue and you can still reproduce this error on the If it is a pull request and you are still interested on having it merged please make sure it can be merged clearly. Thank you for all your contributions. |
This fixes an issue where the site path would be incorrect for
has_onerelationships.When the models were defined as:
The
/api/v1portion ofsitewould be stripped.When doing:
The URL used when doing a
getforshipping_labelwould behttp://example.com/orders/1/shipping_label.json, rather thanhttp://example.com/api/v1/orders/1/shipping_label.json.