Module: ClosureTree::DeterministicOrdering
- Defined in:
- lib/closure_tree/deterministic_ordering.rb
Instance Method Summary collapse
- #order_value ⇒ Object
- #order_value=(new_order_value) ⇒ Object
- #siblings_after ⇒ Object
- #siblings_before ⇒ Object
Instance Method Details
#order_value ⇒ Object
3 4 5 |
# File 'lib/closure_tree/deterministic_ordering.rb', line 3 def order_value read_attribute(_ct.order_column_sym) end |
#order_value=(new_order_value) ⇒ Object
7 8 9 |
# File 'lib/closure_tree/deterministic_ordering.rb', line 7 def order_value=(new_order_value) write_attribute(_ct.order_column_sym, new_order_value) end |
#siblings_after ⇒ Object
15 16 17 |
# File 'lib/closure_tree/deterministic_ordering.rb', line 15 def siblings_after siblings.where(["#{_ct.quoted_order_column} > ?", order_value]) end |
#siblings_before ⇒ Object
11 12 13 |
# File 'lib/closure_tree/deterministic_ordering.rb', line 11 def siblings_before siblings.where(["#{_ct.quoted_order_column} < ?", order_value]) end |