This project is archived and is in readonly mode.
Fixed #respond_to? on ActiveRecord::NamedScope::Scope.
Reported by Eloy Duran | August 13th, 2008 @ 12:57 PM | in 2.x
The Scope class delegates most of the standard methods to the @proxy_found array. It also does this for #respond_to? which breaks stuff, for instance working with test/spec which properly checks if a method exists before dispatching.
This patch makes #respond_to? on instances of Scope work again, but it will also check if the @proxy_scope responds to the message, thus going up the chain to ActiveRecord::Base.
It also changes [].methods to Array.instance_methods, because that's just a bit cleaner.
Comments and changes to this ticket
-
Repository August 13th, 2008 @ 02:56 PM
- State changed from new to resolved
(from [1ee9e3fa5c924bef4aba3d53796f48f5badbd06f]) Fix ActiveRecord::NamedScope::Scope#respond_to? [#818 state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...
-
Repository August 25th, 2008 @ 09:30 AM
(from [56dc039138ea2410a347de4d916b6120442fae3c]) Fix ActiveRecord::NamedScope::Scope#respond_to? [#818 state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 818 Fixed #respond_to? on ActiveRecord::NamedScope::Scope. (from [1ee9e3fa5c924bef4aba3d53796f48f5badbd06f]) Fix Act...
- 818 Fixed #respond_to? on ActiveRecord::NamedScope::Scope. (from [56dc039138ea2410a347de4d916b6120442fae3c]) Fix Act...