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

Rules should be able to take arrays in the hash conditions #29

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

krzyczak
Copy link

No description provided.

@amitsuryavanshi
Copy link
Member

@krzyczak Can you create a issue with some description ?

@@ -44,7 +44,11 @@ def self.property_matches?(subject, property, value)
if subject.is_a?(ActiveGraph::Node::HasN::AssociationProxy)
subject.where(property => value).exists?
else
subject.send(property) == value
if value.is_a?(Enumerable)
subject.class.where(property => value, neo_id: subject.neo_id).exists?
Copy link
Contributor

Choose a reason for hiding this comment

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

if this line is correct then it should handle both cases without the if statement. However, all 10 lines look dubious. If the subject is not a ..Proxy then one should be created rather than querying by neo_id.

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.

4 participants