lib/kasket.rb in kasket-4.0.1 vs lib/kasket.rb in kasket-4.1.0

- old
+ new

@@ -7,11 +7,10 @@ autoload :ReadMixin, 'kasket/read_mixin' autoload :WriteMixin, 'kasket/write_mixin' autoload :DirtyMixin, 'kasket/dirty_mixin' autoload :QueryParser, 'kasket/query_parser' autoload :ConfigurationMixin, 'kasket/configuration_mixin' - autoload :ReloadAssociationMixin, 'kasket/reload_association_mixin' autoload :Query, 'kasket/query' autoload :Visitor, 'kasket/visitor' autoload :SelectManagerMixin, 'kasket/select_manager_mixin' autoload :RelationMixin, 'kasket/relation_mixin' @@ -28,26 +27,15 @@ if defined?(ActiveRecord::Relation) ActiveRecord::Relation.send(:include, Kasket::RelationMixin) Arel::SelectManager.send(:include, Kasket::SelectManagerMixin) end - - if options[:assoliations_reload_hack] - ActiveRecord::Associations::BelongsToAssociation.send(:include, Kasket::ReloadAssociationMixin) - ActiveRecord::Associations::HasOneThroughAssociation.send(:include, Kasket::ReloadAssociationMixin) - end end def self.cache_store=(options) @cache_store = ActiveSupport::Cache.lookup_store(options) end def self.cache @cache_store ||= Rails.cache - end - - def clear_local - if Kasket.cache.respond_to?(:with_local_cache) - Kasket.cache.send(:local_cache).try(:clear) - end end end