Module: Mongoid::Money::Macros::ClassMethods

Defined in:
lib/money/mongoid/macros.rb

Instance Method Summary collapse

Instance Method Details

#monetizable(options = {}) ⇒ Object



13
14
15
16
# File 'lib/money/mongoid/macros.rb', line 13

def monetizable options = {}
	self.send :include, "Mongoid::Monetizable".constantize
	embedded_in options[:as], :polymorphic => true if options[:as]
end

#monetizeObject



9
10
11
# File 'lib/money/mongoid/macros.rb', line 9

def monetize
	self.send :include, "Mongoid::Monetize".constantize						
end