public
Description: rails plugin that allows has_many :through to go through other has_many :throughs
Homepage:
Clone URL: git://github.com/ianwhite/nested_has_many_through.git
100644 10 lines (8 sloc) 0.401 kb
1
2
3
4
5
6
7
8
9
10
require 'nested_has_many_through'
 
ActiveRecord::Associations::HasManyThroughAssociation.send :include, NestedHasManyThrough::Association
 
# BC
if defined?(ActiveRecord::Reflection::ThroughReflection)
  ActiveRecord::Reflection::ThroughReflection.send :include, NestedHasManyThrough::Reflection
else
  ActiveRecord::Reflection::AssociationReflection.send :include, NestedHasManyThrough::Reflection
end