lib/lockbox.rb in lockbox-0.4.3 vs lib/lockbox.rb in lockbox-0.4.4
- old
+ new
@@ -3,10 +3,11 @@
require "openssl"
require "securerandom"
# modules
require "lockbox/box"
+require "lockbox/calculations"
require "lockbox/encryptor"
require "lockbox/key_generator"
require "lockbox/io"
require "lockbox/migrator"
require "lockbox/model"
@@ -23,9 +24,10 @@
Lockbox::LogSubscriber.attach_to :lockbox
ActiveSupport.on_load(:active_record) do
extend Lockbox::Model
extend Lockbox::Model::Attached
+ ActiveRecord::Calculations.prepend Lockbox::Calculations
end
ActiveSupport.on_load(:mongoid) do
Mongoid::Document::ClassMethods.include(Lockbox::Model)
end