Render action in rails 2.3

Hi,

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:

<%= render :controller => 'site', :action => "footer" %>

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.

Zeljko

don’t you just want to render a template like this:
<%= render “shared/footer” %>

?

In application.rb you will need to get all footers and ut them in a
variable.

class AC

before_filter :get_footer

def get_footer
   @links = FooterLinks.all
end

end

in your layout you can either put directly like:

  • for link in @links do
    = link_to link.name, link.path

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

= render :partial => “footer”

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs