Sha256: 3a9624a4db0690c2c811a9d68d3c2a1e01775a031945f5d83b0a208e871974e6
Contents?: true
Size: 472 Bytes
Versions: 1
Compression:
Stored size: 472 Bytes
Contents
class Product < ActiveRecord::Base attr_accessible :price_cents, :discount, :bonus_cents, :price, :discount_value, :bonus # Use USD as model level currency register_currency :usd # Use money-rails macros monetize :price_cents # Use a custom name for the Money attribute monetize :discount, :as => "discount_value" # Override default currency (EUR) with a specific one (GBP) for this field only monetize :bonus_cents, :with_currency => :gbp end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
money-rails-0.3.1 | spec/dummy/app/models/product.rb |