Module: MoneyAttribute::MoneyAmount

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

Overview

Declares fixed-currency money attributes on Active Record models.

Provides the money_amount class method which wires a single backing column to a Mint::Money value object using a custom attribute type and a normalizer. The application default currency (or Current per-request override) applies to all rows.

Examples:

class SimpleOffer < ApplicationRecord
  money_amount :price
end