views:

41

answers:

2

I have a partial that I'd like to use in a layout but when I load up a page it'll look in a different folder for the partial.

So for my layout I've got.

%html
  %head
%body
  .content
    = yield
  .footer
  = render :partial => 'tracking'

And in my layouts folder I have the partial file "app/views/layouts/_tracking.html.haml" that I'd like to use in the layout for all pages. But when I load up a page It'll give me an error saying it can't find the template "products/_tracking.erb"

+1  A: 

I think you just pass it a full path to it, like 3.4.1 second example http://guides.rubyonrails.org/layouts%5Fand%5Frendering.html#using-partials

rogerdpack
+2  A: 

just use

= render :partial => '/layouts/tracking'
tal