Skip to content

criteria.resources ignores opts parameters #25

Description

@fonji

Hello!

I found an error in lib/tripod/criteria/execution.rb:15.
There's a closing parenthesis at the end of the line instead of an opening {.
This ends the method call and so parameters are ignored.
Third line here:

def resources(opts={})
  Tripod::ResourceCollection.new(
    self.resource_class._resources_from_sparql(self.as_query(opts)),
     # pass in the criteria that was used to generate this collection, as well as whether the user specified return graph
    :return_graph => (opts.has_key?(:return_graph) ? opts[:return_graph] : true),
    :criteria => self
  )
end

Should be

def resources(opts={})
  Tripod::ResourceCollection.new(
    self.resource_class._resources_from_sparql(self.as_query(opts),{
         # pass in the criteria that was used to generate this collection, as well as whether the user specified return graph
        :return_graph => (opts.has_key?(:return_graph) ? opts[:return_graph] : true),
        :criteria => self
      }
    )
  )
end

Sorry I can't create a commit right now, maybe tomorrow.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions