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