Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Removing composed_of from ActiveRecord. | Steve Klabnik | 2012-06-18 | 1 | -7/+0 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Closes #1436 Closes #2084 Closes #3807 | ||||
* | Refactor aggregation writer method | Carlos Antonio da Silva | 2012-05-21 | 1 | -1/+0 |
| | | | | Only constantize class_name once. | ||||
* | allow the :converter Proc form composed_of to return nil | Yves Senn | 2012-05-03 | 1 | -0/+5 |
| | | | | | | | This makes it possible to filter invalid input values before they are passed into the value-object (like empty strings). This behaviour is only relevant if the :allow_nil options is set to true. Otherwise you will get the resulting NoMethodError. | ||||
* | 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 |