Was looking to work on a small addition (to has_many) which will be useful 
to me and others alike. A few technical details about the addition:

Basically wanting to have something like,

has_many :subscribers, through: :subscriptions, *source_scope:* :deleted

We currently have to do this in our code as,

has_many :subscribers, through: :subscriptions, conditions: 
'subscriptions.deleted_at IS NOT NULL'

even though Subscription model has already got a :deleted scope. Wouldn't 
it be nice to have something like *:source_scope*?

Along with this, I've found out that if, as per the above example, 
Subscription has a default scope, it is not picked up while calling 
subscribers through subscriptions. Sounds like a bug for 'has_many through'?

Should I go ahead and implement this? Or is there something similar already 
fixed/planned? Had a word with Jose Valim about this and he said Jon 
Leighton & Aaron Patterson are working on this feature for Rails 4?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-core/-/mC9PsYd8fxYJ.
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