public
Rubygem
Description: Most awesome pagination solution for Ruby
Homepage: http://github.com/mislav/will_paginate/wikis
Clone URL: git://github.com/mislav/will_paginate.git
Click here to lend your support to: will_paginate and make a donation at www.pledgie.com !
resolve #204 once and for all!
Mislav Marohnić (author)
Fri Apr 04 21:05:16 -0700 2008
commit  ba73fca96572de414578972a05032c12cfd40afa
tree    0d37184831d235170c470ff179cd3559a8850e3f
parent  1d8a06568ac0259ed1371d13e866d5fab0623fdd
...
34
35
36
37
38
39
40
41
42
43
44
45
 
 
46
47
48
...
34
35
36
 
 
 
 
 
 
 
 
 
37
38
39
40
41
0
@@ -34,15 +34,8 @@ module WillPaginate
0
       ActiveRecord::Base.class_eval { include Finder }
0
 
0
       # support paginating finders on associations
0
-      associations = ActiveRecord::Associations
0
-      collection = associations::AssociationCollection
0
-      classes = [collection]
0
-      # before [9200], HMT wasn't a subclass of AssociationCollection
0
-      unless associations::HasManyThroughAssociation.superclass == collection
0
-        classes << associations::HasManyThroughAssociation
0
-      end
0
-      
0
-      classes.each do |klass|
0
+      a = ActiveRecord::Associations
0
+      [a::AssociationCollection, a::HasManyThroughAssociation].each do |klass|
0
         klass.class_eval do
0
           include Finder::ClassMethods
0
           alias_method_chain :method_missing, :paginate

Comments