Class: ActiveRecord::Refined::BlockContext

Inherits:
Object
  • Object
show all
Defined in:
lib/active_record/refined.rb

Constant Summary collapse

AGGREGATE_FUNCTIONS =
{
  count: :count, sum: :sum, avg: :average, min: :minimum, max: :maximum,
}.freeze
SCALAR_FUNCTIONS =
%i[upper lower length trim coalesce abs round].freeze

Instance Method Summary collapse

Instance Method Details

#exists?(relation) ⇒ Boolean

Returns:

  • (Boolean)


44
45
46
# File 'lib/active_record/refined.rb', line 44

def exists?(relation)
  AST::Exists.new(relation)
end