Repository navigation
Conversation
Consider a simple case when URLs are prefixed with API version:
class ApplicationResource < ActiveResource::Base
self.site = "https://api.quovo.com/v3"
self.include_format_in_path = false
end
class Connection < ApplicationResource
has_one :sync
end
class Sync < ApplicationResource
end
`connection = Connection.find(1)` fetches data from `https://api.quovo.com:443/v3/connections/1`.
`connection.sync` is expected to fetch from `https://api.quovo.com:443/v3/connections/1/sync` but before this fix it tries to fetch it from `https://api.quovo.com:443/connections/1/sync` (missing `/v3/` prefix) that isn’t correct.
I believe that the bug was introduced in rails#100.
rafaelfranca
reviewed
Nov 1, 2018
rafaelfranca
left a comment
Member
There was a problem hiding this comment.
Can we instead of editing existing test add a new test?
| end | ||
|
|
||
| def test_parse_non_singleton_resource_with_has_one_makes_get_request_on_child_route | ||
| accepts = { 'Accept' => 'application/json' } |
Member
There was a problem hiding this comment.
Why this code being removed?
|
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 file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Consider a simple case when URLs are prefixed with API version:
connection = Connection.find(1)fetches data fromhttps://api.quovo.com:443/v3/connections/1.connection.syncis expected to fetch fromhttps://api.quovo.com:443/v3/connections/1/syncbut before this fix it tries to fetch it fromhttps://api.quovo.com:443/connections/1/sync(missing/v3/prefix) that isn’t correct.I believe that the bug was introduced in #100.