Module: Sunrise::NestedSet::Depth::InstanceMethods
- Defined in:
- lib/sunrise/nested_set/depth.rb
Instance Method Summary collapse
-
#depth? ⇒ Boolean
Check is model has depth column.
-
#update_depth ⇒ Object
Update cached_level attribute.
Instance Method Details
#depth? ⇒ Boolean
Check is model has depth column
39 40 41 |
# File 'lib/sunrise/nested_set/depth.rb', line 39 def depth? self.class.depth? end |
#update_depth ⇒ Object
Update cached_level attribute
44 45 46 |
# File 'lib/sunrise/nested_set/depth.rb', line 44 def update_depth update_attribute(:depth, level) end |