Skip to content

Commit

Permalink
Switched to require_relative
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed May 25, 2023
1 parent dd3643b commit 671541f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/active_median.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# dependencies
require "active_support"

require "active_median/enumerable"
require "active_median/version"
# modules
require_relative "active_median/enumerable"
require_relative "active_median/version"

ActiveSupport.on_load(:active_record) do
require "active_median/model"
require_relative "active_median/model"
extend(ActiveMedian::Model)
end

ActiveSupport.on_load(:mongoid) do
require "active_median/mongoid"
require_relative "active_median/mongoid"
Mongoid::Document::ClassMethods.include(ActiveMedian::Mongoid)
end

0 comments on commit 671541f

Please sign in to comment.