Right now I have partials in a view folder corresponding with my controller. ie: controller: example, view: example/_partial.rhtml and I call it with render :partial => ''partial'' How do I add the partial to another folder and call it? ie: controller: example, view: example/new_folder/_partial.rhtml render :partial => ''new_folder/partial'' # does NOT work -- Respectfully: Larry Diehl -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060627/a3ca49db/attachment.html
Hi Larry ~ Try: render :partial => ''/example/new_folder/partial'' ~ Ben On 6/27/06, Larrytheliquid <larrytheliquid@gmail.com> wrote:> > Right now I have partials in a view folder corresponding with my > controller. > > ie: controller: example, view: example/_partial.rhtml > and I call it with render :partial => ''partial'' > > How do I add the partial to another folder and call it? > ie: controller: example, view: example/new_folder/_partial.rhtml > render :partial => ''new_folder/partial'' # does NOT work > > > -- > Respectfully: > Larry Diehl > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- Ben Reubenstein 303-947-0446 http://www.benr75.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060627/0c6a3d8e/attachment.html
Thanks Ben, I got it working by appending an underscore to the physical folder name so now: render :partial => ''new_folder/partial'' # DOES work On 6/27/06, Ben Reubenstein <benr@x-cr.com> wrote:> > Hi Larry ~ > > Try: > > render :partial => ''/example/new_folder/partial'' > > ~ Ben > > On 6/27/06, Larrytheliquid < larrytheliquid@gmail.com> wrote: > > > Right now I have partials in a view folder corresponding with my > controller. > > ie: controller: example, view: example/_partial.rhtml > and I call it with render :partial => ''partial'' > > How do I add the partial to another folder and call it? > ie: controller: example, view: example/new_folder/_partial.rhtml > render :partial => ''new_folder/partial'' # does NOT work > > > -- > Respectfully: > Larry Diehl > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > -- > Ben Reubenstein > 303-947-0446 > http://www.benr75.com > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- Respectfully: Larry Diehl -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060627/68bd7a85/attachment-0001.html