rubyonrailsin

A Ruby and Rails talk

Wednesday, March 24, 2010


[Rails] grouping and acts_as_tree

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

hi,

im using acts_as_tree and im not sure on how to group find-result.

x = find.almost_all

<p>
<% for y in @x.ancestors.reverse %>
  <%= link_to h(y.title), page  %> &gt;
<% end %>
</p>

gives me a nice "breadcrum". but how is it possible to group the list lets say by the 1level or second level?

thx

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive