Skip to content

Conversation

@dam13n
Copy link

@dam13n dam13n commented Mar 26, 2016

issue: #130

So after figuring out a workaround, I finally took a look at the specs and noticed this test

it "should be able to use named scopes" do
      cdq(@author).articles.all_published.array.should == [@article1, @article2, @article3]
end

While this can address the problem, I think it could get dirty. For example:

cdq(cdq(@author).articles.all_published.first).comments.positive.array

Instead of easily chaining, you have to cdq() wrap for each depth level.

I modified CDQRelationshipQuery slightly to fix this (not sure if it is a smart way to do it) and added a spec line.

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.

1 participant