Forum: Ruby on Rails using partials insisde a partial

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
senthil (Guest)
on 2007-04-25 14:34
HI ,
       I am trying to use a partial inside a partial.Basically i am
using ajax support of rails.I am updating a div with partial ,lets say
a.
       Now i want to include a partial b with in a. I am trying this ,
but the html contents are not displayed.
      Can any one knows how to do it??

thanks & regards,
senthil kumar
Andrew S. (Guest)
on 2007-04-25 14:53
(Received via mailing list)
>        I am trying to use a partial inside a partial.Basically i am
> using ajax support of rails.I am updating a div with partial ,lets say
> a.
>        Now i want to include a partial b with in a. I am trying this ,
> but the html contents are not displayed.
>       Can any one knows how to do it??

Try specifying the path to your nested partial.

I.e. instead of

   <%= render :partial => 'foo' ... %>

Do this

   <%= render :partial => 'shared/foo' ... %>

or wherever _foo.rhtml happens to live.

Regards,
Andy S.
This topic is locked and can not be replied to.