module CollectiveIdea::Acts::NestedSet::Move::LegacyWhereStatementExt

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).

Public Instance Methods

where_statement(left_bound, right_bound) click to toggle source
   # File lib/awesome_nested_set/move.rb
53 def where_statement(left_bound, right_bound)
54   instance_arel_table[left_column_name].in(left_bound..right_bound).
55   or(instance_arel_table[right_column_name].in(left_bound..right_bound))
56 end