Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Mar 5, 2013
  1. @steveklabnik
Commits on Feb 27, 2013
  1. @steveklabnik
  2. @steveklabnik

    CHANGELOG entry for ee291b9.

    steveklabnik authored
    Since we released it, it should go in the CHANGELOG.
Commits on Jun 18, 2012
  1. @steveklabnik

    Deprecating composed_of in ActiveRecord

    steveklabnik authored
    This feature adds a lot of complication to ActiveRecord for dubious
    value. Let's talk about what it does currently:
    
    class Customer < ActiveRecord::Base
      composed_of :balance, :class_name => "Money", :mapping => %w(balance
    amount)
    end
    
    Instead, you can do something like this:
    
        def balance
          @balance ||= Money.new(value, currency)
        end
    
        def balance=(balance)
          self[:value] = balance.value
          self[:currency] = balance.currency
          @balance = balance
        end
    
    Since that's fairly easy code to write, and doesn't need anything
    extra from the framework, if you use composed_of today, you'll
    have to add accessors/mutators like that.
    
    This feature will be removed in Rails 4.
Something went wrong with that request. Please try again.