lib/spontaneous/site/level.rb in spontaneous-0.2.0.beta4 vs lib/spontaneous/site/level.rb in spontaneous-0.2.0.beta5

- old
+ new

@@ -2,17 +2,15 @@ class Spontaneous::Site module Level extend Spontaneous::Concern - module ClassMethods - def at_depth(level) - case level - when 0, :root - Spontaneous::Site.root - when 1, :section - Spontaneous::Site.root.at_depth(1) - end + def at_depth(level) + case level + when 0, :root, :home + home + when 1, :section + home.at_depth(1) end - end # ClassMethods + end end # Level end