Module: Sunrise::Models::Structure::ClassMethods
- Defined in:
- lib/sunrise/models/structure.rb
Instance Method Summary collapse
Instance Method Details
#nested_set_options(mover = nil) ⇒ Object
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/sunrise/models/structure.rb', line 31 def (mover = nil) result = [] roots.each do |root| result += root.self_and_descendants.map do |i| [yield(i), i.id] if mover.nil? || mover.new_record? || mover.move_possible?(i) end.compact end result end |