Forum: Ruby on Rails render action in rails 2.3

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Zeljko Dakic (Guest)
on 2009-03-15 13:19
(Received via mailing list)

I might be out of touch with latest features in rails or this might be
just simple error on my part. I can't get this to work in site layout:
<div id="footerWrapper">
  <%= render :controller => 'site', :action => "footer" %>
</div> <!-- footerWrapper -->

I need to list some links in footer and that is why I need this in
layout. If this for some reason isn't working any more, can you please
suggest any alternative approach.

Thanks for all the help.

MaD (Guest)
on 2009-03-15 13:46
(Received via mailing list)
don't you just want to render a template like this:
  <%= render "shared/footer" %>

"Wolas!" (Guest)
on 2009-03-16 13:24
(Received via mailing list)
In application.rb you will need to get all footers and ut them in a

class AC

    before_filter :get_footer

    def get_footer
       @links = FooterLinks.all

in your layout you can either put directly like:

- for link in @links do
  = link_to, link.path

or put it in a partial and call it from the layout

= render :partial => "footer"
This topic is locked and can not be replied to.