Skip to content

Commit

Permalink
level fix
Browse files Browse the repository at this point in the history
  • Loading branch information
slbug committed Nov 2, 2010
1 parent 7f6bdcb commit f3270d4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/awesome_nested_set/base.rb
Expand Up @@ -363,6 +363,7 @@ def leaves
# Returns the level of this object in the tree
# root level is 0
def level
return depth if depth?
parent_id.nil? ? 0 : ancestors.count
end

Expand Down

0 comments on commit f3270d4

Please sign in to comment.