Hi

I am starting to work with rails and like to build a very basic cms.

I was using scaffolding.
Page title:string permalink:string body:text.

What I like to do is create a menu out of the database entries
permalink.
Those should link to the fitting pages.

So i modified my index.html.erb from the pages view like this:

<% @pages.each do |page| %>
    <%= link_to_unless_current page.permalink, page_path(page) %>
<% end %>

I like to use something like the code above in a div layer as a menu
and link the result to the div layer were the <% yield %> is placed.

I was trying to do this with helper module and also with partials, but
I couldnt solve this.
Do I need ajax? or is there a way to do it with rails only?

Maybe someone has a good tip?

Best regards

dlc


--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to