Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Revert "Removing composed_of from ActiveRecord." | Rafael Mendonça França | 2012-07-27 | 1 | -0/+32 | |
| | | | | | | | | | | | This reverts commit 14fc8b34521f8354a17e50cd11fa3f809e423592. 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 | |||||
* | Remove instance level quote_value method. This method is private and also ↵ | kennyj | 2012-07-14 | 1 | -9/+2 | |
| | | | | exists in class method. | |||||
* | Removing composed_of from ActiveRecord. | Steve Klabnik | 2012-06-18 | 1 | -32/+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 | |||||
* | de-globalise method | Jon Leighton | 2012-05-04 | 1 | -1/+1 | |
| | ||||||
* | Refactor and cleanup in some ActiveRecord modules | Carlos Antonio da Silva | 2012-03-03 | 1 | -4/+4 | |
| | | | | | | | | | | | * Avoid double hash lookups in AR::Reflection when reflecting associations/aggregations * Minor cleanups: use elsif, do..end, if..else instead of unless..else * Simplify DynamicMatchers#respond_to? * Use "where" instead of scoped with conditions hash * Extract `scoped_by` method pattern regexp to constant * Extract noisy class_eval from method_missing in dynamic matchers * Extract readonly check, avoid calling column#to_s twice in persistence * Refactor predicate builder, remove some variables | |||||
* | Split out most of the AR::Base code into separate modules :cake: | Jon Leighton | 2011-12-15 | 1 | -0/+194 | |