Skip to content

Conversation

brunvez
Copy link
Owner

@brunvez brunvez commented Apr 16, 2021

Summary

Other Information

end

def test_where_satisfies
relation = Post.where.satisfies { |post| (post.author_id != 1).and(post.id > 2) }

Choose a reason for hiding this comment

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

I really like the wharel method, the satisfies after the where seems confusing (at least to me). Do Rails provide another API similar to this one?

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.

2 participants