class Brake
  scope :good, where(:quality => 'good')
end

Brake.all.select &:nil? #=> works fine
Brake.good.select &:nil? #=> FAILS

Last statement fails because Brake.good.select is returning
ActiveRecord::Relation and not an array.

I have posted a detailed discussion on ticket #4589 .
https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4589-issues-with-scopesassociation-proxies-lazyenum-behavior#ticket-4589-4

Would love to hear thoughts from others.

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to