Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow chaining of #where with combination of string and hash arguments #372

Merged
merged 1 commit into from
Mar 10, 2014

Conversation

cjcolvar
Copy link
Member

@cjcolvar cjcolvar commented Mar 7, 2014

I converted where_values to an array matching ActiveRecord and as mentioned here: samvera/hydra-head#152

This was also reported as a regression by terrellt.

…ombination of string and hash arguments to #where
@jcoyne
Copy link
Member

jcoyne commented Mar 10, 2014

This looks great 👍

mjgiarlo added a commit that referenced this pull request Mar 10, 2014
Allow chaining of #where with combination of string and hash arguments
@mjgiarlo mjgiarlo merged commit 4355da8 into master Mar 10, 2014
@mjgiarlo mjgiarlo deleted the bugfix/where_with_string branch March 10, 2014 17:11
@@ -197,7 +197,7 @@ class Basic < ActiveFedora::Base
end
it "should allow conditions" do
mock_result = {'response'=>{'numFound'=>7}}
ActiveFedora::SolrService.should_receive(:query).with("#{@model_query} AND (foo:bar)", :rows=>0, :raw=>true).and_return(mock_result)
ActiveFedora::SolrService.should_receive(:query).with("#{@model_query} AND foo:bar", :rows=>0, :raw=>true).and_return(mock_result)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test needs to be restored. The parentheses are needed for any where condition that has an OR including access control conditions. I'll update this PR once I've fixed this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants