Skip to content

Commit

Permalink
use .compact to remove nils, if present. Unlikely, but gives a certai…
Browse files Browse the repository at this point in the history
…n level of assurance
  • Loading branch information
parndt committed Mar 20, 2009
1 parent 83627fe commit 1c299db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/active_record/acts/tree.rb
Expand Up @@ -103,7 +103,7 @@ def descendants(node=self)
nodes += descendants(child)
end

nodes
nodes.compact
end
end
end
Expand Down

0 comments on commit 1c299db

Please sign in to comment.