Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Revert "Deprecating composed_of in ActiveRecord" | Rafael Mendonça França | 2012-08-01 | 1 | -6/+4 |
| | | | | This reverts commit 44b313bc4e3762da64dde7894548f81c595147de. | ||||
* | Deprecating composed_of in ActiveRecord | Steve Klabnik | 2012-06-18 | 1 | -4/+6 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. | ||||
* | send() will raise an ArgumentError, so we should leverage ruby | Aaron Patterson | 2011-01-07 | 1 | -1/+1 |
| | |||||
* | Added :constructor and :converter options to composed_of and deprecated the ↵ | Rob Anderton | 2008-09-10 | 1 | -1/+19 |
| | | | | | | conversion block Signed-off-by: Michael Koziarski <michael@koziarski.com> | ||||
* | move assets and models | Jeremy Kemper | 2008-01-18 | 1 | -0/+55 |
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8657 5ecf4fe2-1ee6-0310-87b1-e25e094e27de |