I have a class Foo which has_many_remote Bars.
class Foo
has_many_remote :bars, :path => "/foos/:id/bars"
end
This works great for collections, i.e., I can call @foo.bars and remotely will connect to the external api and populate an array of bars.
What is the recommended way to fetch a specific Bar, that also has the Foo's scope? In other words, I wish to call:
Currently, doing something like @foo.bars.find(2) produces the correct end-result, but fetches the collection then does the find in ruby. This could take forever if there are hundreds of bars associated with this foo. How can I make this call to get the specified bar resource only?