lib/superstore/railtie.rb in superstore-2.4.4 vs lib/superstore/railtie.rb in superstore-2.5.0
- old
+ new
@@ -1,18 +1,10 @@
module Superstore
class Railtie < Rails::Railtie
initializer "superstore.config" do |app|
- ActiveSupport.on_load :superstore do
- pathname = Rails.root.join('config', 'superstore.yml')
- if pathname.exist?
- config = ERB.new(pathname.read).result
- config = YAML.load(config)
-
- if config = config[Rails.env]
- self.config = config.symbolize_keys!
- else
- raise "Missing environment #{Rails.env} in superstore.yml"
- end
+ ActiveSupport.on_load :active_record do
+ ActiveRecord::Relation.class_eval do
+ include Superstore::Relation::Scrolling
end
end
end
end
end