I just upgraded to Rails 2.1 and found that the "counter" property that exists while rendering a collection using a partial now starts at 1, instead of 0 (as before). I verified that this was working in Rails 2.0.2, but it has changed in 2.1. If you have a dependency on this, be careful. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Cayce Balara
2008-Jun-02 15:43 UTC
Re: Bug in Rails 2.1.0 rendering partial "counter" starts at
Eric Ly wrote:> I just upgraded to Rails 2.1 and found that the "counter" property that > exists while rendering a collection using a partial now starts at 1, > instead of 0 (as before). I verified that this was working in Rails > 2.0.2, but it has changed in 2.1. If you have a dependency on this, be > careful.That''s got to be a bug, right? Have you found any release notes that discuss this? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jan Schwenzien
2008-Jun-02 18:21 UTC
Re: Bug in Rails 2.1.0 rendering partial "counter" starts at
Cayce Balara wrote:> That''s got to be a bug, right? Have you found any release notes that > discuss this?No, its a feature. According to lifo in #rails-contrib this is the desired behaviour. I agree btw. even if I have to change some partials now. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Cayce Balara
2008-Jun-02 20:23 UTC
Re: Bug in Rails 2.1.0 rendering partial "counter" starts at
Jan Schwenzien wrote:> Cayce Balara wrote: >> That''s got to be a bug, right? Have you found any release notes that >> discuss this? > > No, its a feature. According to lifo in #rails-contrib this is the > desired behaviour. I agree btw. even if I have to change some partials > now.It''s not so much about the work that needs to be done to change things - those issues are easily found/changed. To me, it''s a fundamental language thing. Maybe I''m just a purist. Ruby as a language counts from zero. IMHO Rails should in this case operate the same as the basics of the underlying language. That being said, and me not being a contributor, I''m off to fix my code. ;) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Cayce Balara
2008-Jun-13 19:57 UTC
Re: Bug in Rails 2.1.0 rendering partial "counter" starts at
Cayce Balara wrote:> Jan Schwenzien wrote: >> Cayce Balara wrote: >>> That''s got to be a bug, right? Have you found any release notes that >>> discuss this? >> >> No, its a feature. According to lifo in #rails-contrib this is the >> desired behaviour. I agree btw. even if I have to change some partials >> now. > > It''s not so much about the work that needs to be done to change things - > those issues are easily found/changed. To me, it''s a fundamental > language thing. Maybe I''m just a purist. Ruby as a language counts from > zero. IMHO Rails should in this case operate the same as the basics of > the underlying language. > > That being said, and me not being a contributor, I''m off to fix my code. > ;)I guess I went off to change code too soon. Looks like this has been fixed/reverted (however you see it). http://rails.lighthouseapp.com/projects/8994/tickets/344-partial-counters-start-from-1-in-2-1 Woot zero index! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---