When you do a where query with the primary key in it uses does a find.
It should be possible to do for example: Recipe.where(id: [1,2], title: 'foo') but now it results in: http://sushi.com/recipes/1,2?title=foo and it should be: http://sushi.com/recipes?id[]=1&id[]=2&title=foo
#test/orm_test.rb
def test_where
endpoint = stub_request(:get, 'http://sushi.com/recipes?id=1').to_return_json(result: [{ id: 1, title: 'Sushi' }])
recipe = Recipe.where(id: 1).first
assert recipe
assert_equal 1, recipe.id
assert_equal 'Sushi', recipe.title
assert_requested endpoint
end
When you do a where query with the primary key in it uses does a find.
It should be possible to do for example:
Recipe.where(id: [1,2], title: 'foo')but now it results in:http://sushi.com/recipes/1,2?title=fooand it should be:http://sushi.com/recipes?id[]=1&id[]=2&title=foo