lib/kasket.rb in kasket-3.1.5 vs lib/kasket.rb in kasket-3.2.0
- old
+ new
@@ -1,6 +1,5 @@
-# -*- encoding: utf-8 -*-
require 'active_record'
require 'active_support'
require 'kasket/version'
@@ -14,12 +13,10 @@
autoload :Query, 'kasket/query'
autoload :Visitor, 'kasket/visitor'
autoload :SelectManagerMixin, 'kasket/select_manager_mixin'
autoload :RelationMixin, 'kasket/relation_mixin'
- AR30 = (ActiveRecord::VERSION::MAJOR == 3 && ActiveRecord::VERSION::MINOR == 0)
-
CONFIGURATION = {:max_collection_size => 100}
module_function
def setup(options = {})
@@ -34,12 +31,9 @@
Arel::SelectManager.send(:include, Kasket::SelectManagerMixin)
end
if options[:assoliations_reload_hack]
ActiveRecord::Associations::BelongsToAssociation.send(:include, Kasket::ReloadAssociationMixin)
- if ActiveRecord::VERSION::MAJOR == 2 || AR30
- ActiveRecord::Associations::BelongsToPolymorphicAssociation.send(:include, Kasket::ReloadAssociationMixin)
- end
ActiveRecord::Associations::HasOneThroughAssociation.send(:include, Kasket::ReloadAssociationMixin)
end
end
def self.cache_store=(options)