I added support for spacer_template: render :partial => @foos, :spacer_template => ''foos/between'' You can also omit :object: render :partial => @foo http://dev.rubyonrails.org/ticket/6609 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
On 11/13/06, Rich Collins <richcollins@gmail.com> wrote:> > I added support for spacer_template: > > render :partial => @foos, :spacer_template => ''foos/between'' > > You can also omit :object: > > render :partial => @fooDoesn''t simply helpful already do this? -- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
It does not. I would get a method_missing on nil when trying to access the variable in the partial template On Nov 13, 2006, at 12:53 PM, Michael Koziarski wrote:> > On 11/13/06, Rich Collins <richcollins@gmail.com> wrote: >> >> I added support for spacer_template: >> >> render :partial => @foos, :spacer_template => ''foos/between'' >> >> You can also omit :object: >> >> render :partial => @foo > > Doesn''t simply helpful already do this? > -- > Cheers > > Koz > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
> It does not. I would get a method_missing on nil when trying to > access the variable in the partial templateI''m doing this at present: <%= render :partial=>@page %> with _page.rhtml happily working with the page <%= page.title %>> On Nov 13, 2006, at 12:53 PM, Michael Koziarski wrote: > > > > > On 11/13/06, Rich Collins <richcollins@gmail.com> wrote: > >> > >> I added support for spacer_template: > >> > >> render :partial => @foos, :spacer_template => ''foos/between'' > >> > >> You can also omit :object: > >> > >> render :partial => @foo > > > > Doesn''t simply helpful already do this? > > -- > > Cheers > > > > Koz > > > > > > > > > >-- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Does it work rendering from a view outside of views/pages? Perhaps I just have a bug. I will look at my environment again and have a look at the source once more. On Nov 13, 2006, at 1:42 PM, Michael Koziarski wrote:> >> It does not. I would get a method_missing on nil when trying to >> access the variable in the partial template > > I''m doing this at present: > > <%= render :partial=>@page %> > > with _page.rhtml happily working with the page > > <%= page.title %> > > > > >> On Nov 13, 2006, at 12:53 PM, Michael Koziarski wrote: >> >>> >>> On 11/13/06, Rich Collins <richcollins@gmail.com> wrote: >>>> >>>> I added support for spacer_template: >>>> >>>> render :partial => @foos, :spacer_template => ''foos/between'' >>>> >>>> You can also omit :object: >>>> >>>> render :partial => @foo >>> >>> Doesn''t simply helpful already do this? >>> -- >>> Cheers >>> >>> Koz >>> >>>> >> >> >>> >> > > > -- > Cheers > > Koz > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Ah wait. You are using @page. Try it with a local variable: render :partial => page On Nov 13, 2006, at 1:42 PM, Michael Koziarski wrote:> >> It does not. I would get a method_missing on nil when trying to >> access the variable in the partial template > > I''m doing this at present: > > <%= render :partial=>@page %> > > with _page.rhtml happily working with the page > > <%= page.title %> > > > > >> On Nov 13, 2006, at 12:53 PM, Michael Koziarski wrote: >> >>> >>> On 11/13/06, Rich Collins <richcollins@gmail.com> wrote: >>>> >>>> I added support for spacer_template: >>>> >>>> render :partial => @foos, :spacer_template => ''foos/between'' >>>> >>>> You can also omit :object: >>>> >>>> render :partial => @foo >>> >>> Doesn''t simply helpful already do this? >>> -- >>> Cheers >>> >>> Koz >>> >>>> >> >> >>> >> > > > -- Cheers > > Koz > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
On Mon, Nov 13, 2006 at 02:38:07PM -0800, Rich Collins wrote:> Ah wait. You are using @page. Try it with a local variable: > > render :partial => pageIf you have an instance variable with the same name as a partial it is implicitly passed via :object. marcel -- Marcel Molina Jr. <marcel@vernix.org> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Right - I added support for the case where you do not have an instance variable set On Nov 13, 2006, at 2:47 PM, Marcel Molina Jr. wrote:> > On Mon, Nov 13, 2006 at 02:38:07PM -0800, Rich Collins wrote: >> Ah wait. You are using @page. Try it with a local variable: >> >> render :partial => page > > If you have an instance variable with the same name as a partial it is > implicitly passed via :object. > > marcel > -- > Marcel Molina Jr. <marcel@vernix.org> > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---