Sha256: 4c5b04117858f2f00cdae3a20c01c61bf9f78abad3818f0598199ad88c730ee7

Contents?: true

Size: 331 Bytes

Versions: 1

Compression:

Stored size: 331 Bytes

Contents

module ActiveRecord
  module Precount
    module BaseExtension
      delegate :precount, :eager_count, to: :all

      def has_reflection?(name)
        reflection_for(name).present?
      end

      def reflection_for(name)
        reflections[name.to_s]
      end
    end
  end

  Base.send(:extend, Precount::BaseExtension)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
activerecord-precount-0.6.0 lib/active_record/precount/base_extension.rb