Permalink
Browse files

Merge pull request #2 from RubyMoney/lazyinit

Use lazy-initialization
  • Loading branch information...
2 parents 9811fa6 + d9757de commit 04848df08bc959971a5d8ebe9c03dc1cabe20da9 @alup alup committed Apr 17, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/money-rails/railtie.rb
@@ -1,7 +1,11 @@
module MoneyRails
module Monetizable
class Railtie < ::Rails::Railtie
- ActiveRecord::Base.send :include, Monetizable
+ initializer "moneyrails.initialize" do
+ ActiveSupport.on_load(:active_record) do
+ include MoneyRails::Monetizable
+ end
+ end
end
end
end

0 comments on commit 04848df

Please sign in to comment.