lib/arid_cache/cache_proxy/utilities.rb
def collection_klass(collection)
        if collection.respond_to?(:proxy_association)
          collection.proxy_association.klass
        elsif collection.respond_to?(:proxy_reflection)
          collection.proxy_reflection.klass
        elsif defined?(::ActiveRecord::Relation) && collection.is_a?(::ActiveRecord::Relation)
          collection.klass
        elsif collection.respond_to?(:first) && collection.first
          collection.first.class
        end
      end
# Infer the class of the objects in a collection.  The collection could be empty.
# If the collection is a relation or proxy reflection we can get the class from it.
#
# Return the class or nil if no class can be inferred.
Infer the class of the objects in a collection.  The collection could be empty.
If the collection is a relation or proxy reflection we can get the class from it.

Return the class or nil if no class can be inferred.
Infer the class of the objects in a collection . The collection could be empty . If the collection is a relation or proxy reflection we can get the class from it . Return the class or nil if no class can be inferred .
def collection_klass(collection)
        if collection.respond_to?(:proxy_association)
          collection.proxy_association.klass
        elsif collection.respond_to?(:proxy_reflection)
          collection.proxy_reflection.klass
        elsif defined?(::ActiveRecord::Relation) && collection.is_a?(::ActiveRecord::Relation)
          collection.klass
        elsif collection.respond_to?(:first) && collection.first
          collection.first.class
        end
      end
def collection_klass ( collection ) if collection . respond_to? ( :proxy_association ) collection . proxy_association . klass elsif collection . respond_to? ( :proxy_reflection ) collection . proxy_reflection . klass elsif defined? ( :: ActiveRecord :: Relation ) && collection . is_a? ( :: ActiveRecord :: Relation ) collection . klass elsif collection . respond_to? ( :first ) && collection . first collection . first . class end end
Infer the class of the objects in a collection.
Infer the class of the objects in a collection .
collection