Module: CollectiveIdea::Acts::NestedSet::Move::LegacyWhereStatementExt

Included in:
CollectiveIdea::Acts::NestedSet::Move
Defined in:
lib/awesome_nested_set/move.rb

Overview

Before Arel 6, there was ‘in’ method, which was replaced with ‘between’ in Arel 6 and now gives deprecation warnings in verbose mode. This is patch to support rails 4.0 (Arel 4) and 4.1 (Arel 5).

Instance Method Summary collapse

Instance Method Details

#where_statement(left_bound, right_bound) ⇒ Object



53
54
55
56
# File 'lib/awesome_nested_set/move.rb', line 53

def where_statement(left_bound, right_bound)
  instance_arel_table[left_column_name].in(left_bound..right_bound).
  or(instance_arel_table[right_column_name].in(left_bound..right_bound))
end