Why not put it in the layouts directory? You could just have
/layouts/_mypartial.rhtml and call like render :partial =>
"layouts/mypartial"
I haven''t tried it, so I can''t verify if it works or not, but
I''d much
rather keep items that are global in the layouts directory where my layout
is stored. Of course, I am assuming that you are using a layout... which
would be best if you are using the same base markup for all of your pages.
HTH,
Ryan
On 5/12/06, Chris Ingrassia <Chris.Ingrassia@fortiusone.com>
wrote:>
>
> IIRC, you can simply prefix the partial name with a path and it
> will
> work.
>
> ex:
>
> render :partial => "partials/myglobalpartial"
>
> will render app/views/partials/_myglobalpartial.rhtml
>
> Is that what you were looking for?
>
> On May 12, 2006, at 4:57 PM, Marston A. wrote:
>
> > Quick question:
> >
> > Whats the easiest way to implement a global partial? Where I can call
> > one partial from many different controllers (err controller views)?
> >
> > --
> > Posted via http://www.ruby-forum.com/.
> > _______________________________________________
> > Rails mailing list
> > Rails@lists.rubyonrails.org
> > http://lists.rubyonrails.org/mailman/listinfo/rails
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
--
Ryan Prins
rprins@gmail.com
http://www.lazyi.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060512/2986cab7/attachment.html