I\'m slightly insecure about my breadcrumb solution. Names and links are defined in each controller action:
Home
This is mostly a matter of opinion, but anyway:
*_name
and *_link
, I'd suggest using proper objects anyway, with some link_to
functionality.You might find Episode 162 of Railscasts of interest for a nice solution that gets by with
<% for page in @page.ancestors.reverse %>
<%= link_to h(page.name), page %> >
<% end %>