I am trying to pass some params to a resource call to get only the votes matching those params
It seems to be ignoring those params on a query because it just returns all of the votes regardless of params
Also when attempting to use get like this post suggests: Angular 1.0.8 $resource with multiple optional get parameters it gives error: expected object but got an array
What is the issue here?
Service
wrmcServices.factory 'Vote', ($resource) ->
$resource 'api/v1/votes.json',{},
query:
method:'GET'
params:
voteId:'votes'
isArray:true
Note: I also tried removing the params: voteId:'votes' but it made no difference, if anyone wants to tell me what this does in this case it would be good to know, i just added that part from a tutorial
My query and get attempts
Vote.query({votable_id:scope.votableId,votable_type:scope.votableType});
Vote.get({votable_id:scope.votableId,votable_type:scope.votableType});