{"issue":{"created_at":"2011-12-07T14:01:50Z","state":"open","updated_at":"2011-12-08T19:38:00Z","comments":1,"user":{"gravatar_id":"38c2be174896d814a5ccc5475c132d08","id":6605,"url":"https://api.github.com/users/ebrett","avatar_url":"https://secure.gravatar.com/avatar/38c2be174896d814a5ccc5475c132d08?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"ebrett"},"body":"I am converting a site built for 2.3.11 to 3.1 and having difficulties with an extension:\r\n\r\n          has_many :actions, :class_name => 'Streamer::Model::Action', :through => :action_channel_entries, :order => 'actions.id desc' do\r\n        \r\n        def subscriptions\r\n          proxy_association.owner.subscriptions\r\n        end\r\n      end\r\n      \r\n      has_many :subscriptions, :class_name => 'Streamer::Model::ActionChannelSubscription'\r\n\r\nWorks for 2.3 (substitute proxy_association.owner with proxy_owner) but not for 3.1.3 - the self inside the extension in 2.3 is a named scope and it looks like in the documentation that for 3.1 it should now be a CollectionProxy - but when I run a test it is an ActiveRecord::Relation - which does not have a proxy_association.  Any suggestions for what could be going on here?\r\n\r\n    \r\n  1) Hotseat validation should have a published date when published\r\n     Failure/Error: @hotseat.publish!\r\n     NameError:\r\n       undefined local variable or method `proxy_association' for []:ActiveRecord::Relation\r\n     # ./app/lib/streamer/model/action_channel.rb:11:in `subscriptions'\r\n     # ./app/lib/streamer/behaviour/action_subscriber.rb:25:in `active_subscription_for_model'\r\n     # ./app/lib/streamer/behaviour/action_subscriber.rb:7:in `subscribe_to'\r\n     # ./app/models/hotseat.rb:9:in `subscribe_author'\r\n     # ./lib/publishable_content_state_machine.rb:63:in `publish_actions'\r\n     # ./spec/models/hotseat_spec.rb:79\r\n     # ./spec/models/hotseat_spec.rb:78\r\n","assignee":null,"id":2474777,"labels":[],"number":3890,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"title":"Extension for a complex has_many :through","html_url":"https://github.com/rails/rails/issues/3890","closed_at":null,"url":"https://api.github.com/repos/rails/rails/issues/3890","milestone":null},"action":"reopened"}