module BabySqueel::ActiveRecord::WhereChain

Public Instance Methods

has(&block) click to toggle source

Constructs Arel for ActiveRecord::Base#where using the DSL.

# File lib/baby_squeel/active_record/where_chain.rb, line 7
def has(&block)
  arel = DSL.evaluate(@scope, &block)
  @scope.where!(arel) unless arel.blank?
  @scope
end