Sha256: 96498d6461a2bbd16545a577c5ec750cb1afb93fc4a553b0e6daea7f8ef7f8b3

Contents?: true

Size: 561 Bytes

Versions: 8

Compression:

Stored size: 561 Bytes

Contents

require "active_support"

require "active_median/enumerable"
require "active_median/version"

module ActiveMedian
  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

8 entries across 8 versions & 1 rubygems

Version Path
active_median-0.3.1 lib/active_median.rb
active_median-0.3.0 lib/active_median.rb
active_median-0.2.8 lib/active_median.rb
active_median-0.2.7 lib/active_median.rb
active_median-0.2.6 lib/active_median.rb
active_median-0.2.5 lib/active_median.rb
active_median-0.2.4 lib/active_median.rb
active_median-0.2.3 lib/active_median.rb