Sha256: 05809fadf49eb08da094e205606d5a7ab9089d3f9ecf5026d0b9f5aa1c69833e
Contents?: true
Size: 548 Bytes
Versions: 23
Compression:
Stored size: 548 Bytes
Contents
module ClosureTree module DeterministicOrdering def order_value read_attribute(_ct.order_column_sym) end def update_order_value(order_value) update_column(_ct.order_column_sym, order_value) end def order_value=(new_order_value) write_attribute(_ct.order_column_sym, new_order_value) end def siblings_before siblings.where(["#{_ct.quoted_order_column} < ?", order_value]) end def siblings_after siblings.where(["#{_ct.quoted_order_column} > ?", order_value]) end end end
Version data entries
23 entries across 23 versions & 1 rubygems