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"
On Mar 15, 8:22 am, Zeljko Dakic <[email protected]> wrote:
> 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:
> <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.
>
> Zeljko
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---