Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Fixed #respond_to? on ActiveRecord::NamedScope::Scope.

#818

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.

Reported by Eloy Duran · August 13th, 2008 @ 12:57 PM

State: resolved
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. Repository
    Repository
    • State changed from new to resolved

    (from [1ee9e3fa5c924bef4aba3d53796f48f5badbd06f]) Fix ActiveRecord::NamedScope::Scope#respond_to? [#818 Fixed #respond_to? on ActiveRecord::NamedScope::Scope. state:resolved]

    Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...

    August 13th, 2008 @ 02:56 PM

  2. Repository
    Repository

    (from [56dc039138ea2410a347de4d916b6120442fae3c]) Fix ActiveRecord::NamedScope::Scope#respond_to? [#818 Fixed #respond_to? on ActiveRecord::NamedScope::Scope. state:resolved]

    Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...

    August 25th, 2008 @ 09:30 AM