lib/sluggable_finder.rb in sluggable_finder-2.3.1 vs lib/sluggable_finder.rb in sluggable_finder-2.3.2

- old
+ new

@@ -17,15 +17,15 @@ def enable_activerecord ActiveRecord::Base.extend SluggableFinder::Orm::ClassMethods # support for associations a = ActiveRecord::Associations - returning([ a::AssociationCollection ]) { |classes| + Array(ActiveRecord::Associations::AssociationCollection.tap { |classes| # detect http://dev.rubyonrails.org/changeset/9230 unless a::HasManyThroughAssociation.superclass == a::HasManyAssociation classes << a::HasManyThroughAssociation end - }.each do |klass| + }).each do |klass| klass.send :include, SluggableFinder::Finder klass.send :include, SluggableFinder::AssociationProxyFinder klass.alias_method_chain :find, :slug end