Sha256: 899c8415764df69bc776fef9d8d887fd85cec857c5825cac4b5343fb212188de
Contents?: true
Size: 586 Bytes
Versions: 2
Compression:
Stored size: 586 Bytes
Contents
require "active_support" require "active_median/enumerable" require "active_median/version" module ActiveMedian # TODO remove in 0.4.0 def self.drop_function ActiveRecord::Base.connection.execute <<-SQL DROP AGGREGATE IF EXISTS median(anyelement); DROP FUNCTION IF EXISTS median(anyarray); SQL true end end ActiveSupport.on_load(:active_record) do require "active_median/model" extend(ActiveMedian::Model) end ActiveSupport.on_load(:mongoid) do require "active_median/mongoid" Mongoid::Document::ClassMethods.include(ActiveMedian::Mongoid) end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
active_median-0.3.3 | lib/active_median.rb |
active_median-0.3.2 | lib/active_median.rb |