Class: Ransack::Nodes::Condition

Inherits:
Object
  • Object
show all
Defined in:
lib/ahoy_captain/engine.rb

Instance Method Summary collapse

Instance Method Details

#casted_array?(predicate) ⇒ Boolean

allows for sql from a formatter see github.com/activerecord-hackery/ransack/issues/702

Returns:

  • (Boolean)


17
18
19
20
21
# File 'lib/ahoy_captain/engine.rb', line 17

def casted_array?(predicate)
  return unless predicate.is_a?(Arel::Nodes::Casted)

  predicate.value.is_a?(Array)
end