We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7efeaa4 + 051dca6 commit 892d195Copy full SHA for 892d195
lib/draper.rb
@@ -37,7 +37,7 @@ def self.setup_action_mailer(base)
37
end
38
39
40
- def self.setup_active_record(base)
+ def self.setup_orm(base)
41
base.class_eval do
42
include Draper::Decoratable
43
lib/draper/railtie.rb
@@ -30,9 +30,11 @@ class Railtie < Rails::Railtie
30
31
32
33
- initializer "draper.setup_active_record" do |app|
34
- ActiveSupport.on_load :active_record do
35
- Draper.setup_active_record self
+ initializer "draper.setup_orm" do |app|
+ [:active_record, :mongoid].each do |orm|
+ ActiveSupport.on_load orm do
36
+ Draper.setup_orm self
+ end
0 commit comments