Module: MoneyAttribute::Macro

Extended by:
ActiveSupport::Concern
Defined in:
lib/money_attribute/macro.rb

Overview

Declares composite money attributes on Active Record models.

Provides the money_attribute class method which wires a two-column (amount + currency) backing store to a Mint::Money value object via composed_of.

Examples:

class Product < ApplicationRecord
  money_attribute :price
end

Defined Under Namespace

Modules: CompositeClassMethods