EugZol / where_exists

Adds the power of SQL Exists to ActiveRecord
MIT License
110 stars 18 forks source link

Added support for relations with conditions/scopes #8

Closed apauly closed 6 years ago

apauly commented 6 years ago

I've added support for relations which have a default conditions. I've also added a test - all tests are passing.

E.g. something like this:

class User < ActiveRecord::Base
  has_many :drafts, -> { where published: nil }
end
EugZol commented 6 years ago

Looks great! Thanks.