If we change ActionView::Base.erb_variable, cache_fragment doesn''t work and some javascript functions also, because they are checking for the existence of ''_erbout'' instead of the variable set in erb_variable. It''s just a small patch, that fix javascript functions and send erb_variable to Erb.new(). I also added the line below in fragment cache tests setup to assure that they are working with any variable set: ActionView::Base.erb_variable = ''_buf'' Patch here: http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/298-added-more-support-to-actionview-base-erb_variable --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I am curious to know why you need to change the value of ActionView::Base.erb_variable ? I''m more inclined towards removing that configuration option altogether. On Mon, Jun 2, 2008 at 12:39 PM, José Valim <jose.valim@gmail.com> wrote:> > If we change ActionView::Base.erb_variable, cache_fragment doesn''t > work and some javascript functions also, because they are checking for > the existence of ''_erbout'' instead of the variable set in > erb_variable. > > It''s just a small patch, that fix javascript functions and send > erb_variable to Erb.new(). > > I also added the line below in fragment cache tests setup to assure > that they are working with any variable set: > > ActionView::Base.erb_variable = ''_buf'' > > Patch here: > http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/298-added-more-support-to-actionview-base-erb_variable > > >-- Cheers! - Pratik http://m.onkey.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 -~----------~----~----~----~------~----~------~--~---
I''m using it with Erubis and it''s very handy! If the point is accept many template handlers, that flexibility is needed. Otherwise I would need to hack any new template installed. On Jun 2, 1:50 pm, Pratik <pratikn...@gmail.com> wrote:> I am curious to know why you need to change the value of > ActionView::Base.erb_variable ? I''m more inclined towards removing > that configuration option altogether. > > > > On Mon, Jun 2, 2008 at 12:39 PM, José Valim <jose.va...@gmail.com> wrote: > > > If we change ActionView::Base.erb_variable, cache_fragment doesn''t > > work and some javascript functions also, because they are checking for > > the existence of ''_erbout'' instead of the variable set in > > erb_variable. > > > It''s just a small patch, that fix javascript functions and send > > erb_variable to Erb.new(). > > > I also added the line below in fragment cache tests setup to assure > > that they are working with any variable set: > > > ActionView::Base.erb_variable = ''_buf'' > > > Patch here: > >http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/29... > > -- > Cheers! > - Pratikhttp://m.onkey.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 -~----------~----~----~----~------~----~------~--~---
Fair enough. Cannot apply the patch as I''m gettin about 25 actionpack test failures/errors :) On Mon, Jun 2, 2008 at 1:12 PM, José Valim <jose.valim@gmail.com> wrote:> > I''m using it with Erubis and it''s very handy! > > If the point is accept many template handlers, that flexibility is > needed. > Otherwise I would need to hack any new template installed. > > On Jun 2, 1:50 pm, Pratik <pratikn...@gmail.com> wrote: >> I am curious to know why you need to change the value of >> ActionView::Base.erb_variable ? I''m more inclined towards removing >> that configuration option altogether. >> >> >> >> On Mon, Jun 2, 2008 at 12:39 PM, José Valim <jose.va...@gmail.com> wrote: >> >> > If we change ActionView::Base.erb_variable, cache_fragment doesn''t >> > work and some javascript functions also, because they are checking for >> > the existence of ''_erbout'' instead of the variable set in >> > erb_variable. >> >> > It''s just a small patch, that fix javascript functions and send >> > erb_variable to Erb.new(). >> >> > I also added the line below in fragment cache tests setup to assure >> > that they are working with any variable set: >> >> > ActionView::Base.erb_variable = ''_buf'' >> >> > Patch here: >> >http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/29... >> >> -- >> Cheers! >> - Pratikhttp://m.onkey.org > > >-- Cheers! - Pratik http://m.onkey.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 -~----------~----~----~----~------~----~------~--~---
This is strange, I wasn''t probably running all tests. I will take a deeper look into it! On Jun 2, 2:24 pm, Pratik <pratikn...@gmail.com> wrote:> Fair enough. > > Cannot apply the patch as I''m gettin about 25 actionpack test failures/errors :) > > > > On Mon, Jun 2, 2008 at 1:12 PM, José Valim <jose.va...@gmail.com> wrote: > > > I''m using it with Erubis and it''s very handy! > > > If the point is accept many template handlers, that flexibility is > > needed. > > Otherwise I would need to hack any new template installed. > > > On Jun 2, 1:50 pm, Pratik <pratikn...@gmail.com> wrote: > >> I am curious to know why you need to change the value of > >> ActionView::Base.erb_variable ? I''m more inclined towards removing > >> that configuration option altogether. > > >> On Mon, Jun 2, 2008 at 12:39 PM, José Valim <jose.va...@gmail.com> wrote: > > >> > If we change ActionView::Base.erb_variable, cache_fragment doesn''t > >> > work and some javascript functions also, because they are checking for > >> > the existence of ''_erbout'' instead of the variable set in > >> > erb_variable. > > >> > It''s just a small patch, that fix javascript functions and send > >> > erb_variable to Erb.new(). > > >> > I also added the line below in fragment cache tests setup to assure > >> > that they are working with any variable set: > > >> > ActionView::Base.erb_variable = ''_buf'' > > >> > Patch here: > >> >http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/29... > > >> -- > >> Cheers! > >> - Pratikhttp://m.onkey.org > > -- > Cheers! > - Pratikhttp://m.onkey.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 -~----------~----~----~----~------~----~------~--~---
Oh crap! =P I forget to set a teardown in caching_test.rb, at the end of the file. def teardown ActionView::Base.erb_variable = ''_erbout'' end I''ve attached another file in Lighthouse. =) On Jun 2, 2:28 pm, José Valim <jose.va...@gmail.com> wrote:> This is strange, I wasn''t probably running all tests. > I will take a deeper look into it! > > On Jun 2, 2:24 pm, Pratik <pratikn...@gmail.com> wrote: > > > Fair enough. > > > Cannot apply the patch as I''m gettin about 25 actionpack test failures/errors :) > > > On Mon, Jun 2, 2008 at 1:12 PM, José Valim <jose.va...@gmail.com> wrote: > > > > I''m using it with Erubis and it''s very handy! > > > > If the point is accept many template handlers, that flexibility is > > > needed. > > > Otherwise I would need to hack any new template installed. > > > > On Jun 2, 1:50 pm, Pratik <pratikn...@gmail.com> wrote: > > >> I am curious to know why you need to change the value of > > >> ActionView::Base.erb_variable ? I''m more inclined towards removing > > >> that configuration option altogether. > > > >> On Mon, Jun 2, 2008 at 12:39 PM, José Valim <jose.va...@gmail.com> wrote: > > > >> > If we change ActionView::Base.erb_variable, cache_fragment doesn''t > > >> > work and some javascript functions also, because they are checking for > > >> > the existence of ''_erbout'' instead of the variable set in > > >> > erb_variable. > > > >> > It''s just a small patch, that fix javascript functions and send > > >> > erb_variable to Erb.new(). > > > >> > I also added the line below in fragment cache tests setup to assure > > >> > that they are working with any variable set: > > > >> > ActionView::Base.erb_variable = ''_buf'' > > > >> > Patch here: > > >> >http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/29... > > > >> -- > > >> Cheers! > > >> - Pratikhttp://m.onkey.org > > > -- > > Cheers! > > - Pratikhttp://m.onkey.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 -~----------~----~----~----~------~----~------~--~---