Hi *, I cannot find any active bug tracker, so I want to share my todays experience here... Concerning this commit: https://github.com/rails/rails/commit/bfbdeeae3080c89a0b27e42d684cbeb6206c6f60#activerecord/lib/active_record/named_scope.rb I updated my rails app today and discovered, that this commit might have broken some compatibility. I used something like this: collection = <Model>.scoped ... This does not work anymore, I have to add ({}) - so i think it should be def scoped(scope={}, &block) instead of def scoped(scope, &block) What do you think? -- 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.
Michael Koziarski
2011-Sep-28 19:56 UTC
Re: Rails 2.3.4 -> 2.3.14: broken api compatibility?
On Thursday, 29 September 2011 at 5:14 AM, franzk wrote:> Hi *, > > I cannot find any active bug tracker, so I want to share my todays > experience here... > > Concerning this commit: > > https://github.com/rails/rails/commit/bfbdeeae3080c89a0b27e42d684cbeb6206c6f60#activerecord/lib/active_record/named_scope.rb > > I updated my rails app today and discovered, that this commit might > have broken some compatibility. I used something like this: > > collection = <Model>.scoped > ... > > This does not work anymore, I have to add ({}) - so i think it should > be > > def scoped(scope={}, &block) > > instead of > > def scoped(scope, &block) > > What do you think?It does seem like you''ve found an unintentional breakage introduced in the 2-3 stream, however 2.3 is now only receiving security fixes so this won''t be fixed. You''ll have to change your code to work around this, or upgrade to 3.0 or 3.1 to avoid it entirely. -- 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.