- 31 5月, 2016 1 次提交
-
-
由 Sean Griffin 提交于
This behavior was broken by 36e9be85. When the value is assigned directly, either through mass assignment or directly assigning a hash, the hash gets passed through to this writer method directly. While this is intended to handle certain cases, when an explicit converter has been provided, we should continue to use that instead. The positioning of the added guard caused the new behavior to override that case. Fixes #25210
-
- 29 11月, 2014 1 次提交
-
-
由 Erik Michaels-Ober 提交于
-
- 28 7月, 2012 1 次提交
-
-
由 Rafael Mendonça França 提交于
This reverts commit 14fc8b34. Reason: we need to discuss a better path from this removal. Conflicts: activerecord/lib/active_record/reflection.rb activerecord/test/cases/base_test.rb activerecord/test/models/developer.rb
-
- 19 6月, 2012 1 次提交
-
-
由 Steve Klabnik 提交于
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
-
- 22 5月, 2012 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
Only constantize class_name once.
-
- 03 5月, 2012 1 次提交
-
-
由 Yves Senn 提交于
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.
-
- 08 1月, 2011 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 11 9月, 2008 1 次提交
-
-
由 Rob Anderton 提交于
Signed-off-by: NMichael Koziarski <michael@koziarski.com>
-
- 18 1月, 2008 1 次提交
-
-
由 Jeremy Kemper 提交于
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8657 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-
- 24 10月, 2007 1 次提交
-
-
由 Jeremy Kemper 提交于
Assigning an instance of a foreign class to a composed_of aggregate calls an optional conversion block. Refactor and simplify composed_of implementation. Closes #6322. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8003 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-
- 22 5月, 2006 1 次提交
-
-
由 David Heinemeier Hansson 提交于
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4353 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-
- 07 4月, 2006 1 次提交
-
-
由 David Heinemeier Hansson 提交于
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4188 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-
- 08 12月, 2005 1 次提交
-
-
由 Jeremy Kemper 提交于
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3242 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-
- 02 3月, 2005 1 次提交
-
-
由 David Heinemeier Hansson 提交于
Added better defaults for composed_of, so statements like composed_of :time_zone, :mapping => %w( time_zone time_zone ) can be written without the mapping part (it's now assumed) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@821 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-
- 24 11月, 2004 1 次提交
-
-
由 David Heinemeier Hansson 提交于
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-