An attribute-driven hierarchy builder for Rails views.