class ActiveRecord::QueryMethods::WhereChain

Public Instance Methods

is(&block) click to toggle source
# File lib/where-is-rails/where-is-rails.rb, line 74
def is(&block)
  arel_table = @scope.klass.arel_table

  @scope.where WhereIs.new(arel_table, &block).result
end
is_not(&block) click to toggle source
# File lib/where-is-rails/where-is-rails.rb, line 80
def is_not &block
  arel_table = @scope.klass.arel_table

  self.not WhereIs.new(arel_table, &block).result
end