aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/dynamic_matchers.rb
Commit message (Collapse)AuthorAgeFilesLines
* made dynamic finders alias_attribute awareMaximilian Schneider2012-06-221-0/+1
| | | | | previously dynamic finders only worked in combination with the actual column name and not its alias defined with #alias_attribute
* Removing composed_of from ActiveRecord.Steve Klabnik2012-06-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* extract deprecated dynamic methodsJon Leighton2012-05-041-140/+38
|
* actually don't need to expand the aggregates at allJon Leighton2012-05-041-11/+1
|
* #to_sym is unnecessaryJon Leighton2012-05-041-3/+3
|
* de-globalise methodJon Leighton2012-05-041-8/+1
|
* extract code from AR::BaseJon Leighton2012-05-041-32/+28
|
* clean up implementation of dynamic methods. use method compilation etc.Jon Leighton2012-05-041-29/+199
|
* Refactor and cleanup in some ActiveRecord modulesCarlos Antonio da Silva2012-03-031-19/+23
| | | | | | | | | | | * 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
* Move argument validation into matchPaul McMahon2012-01-281-1/+1
|
* Fix regression from Rails 3.1Paul McMahon2012-01-271-1/+1
| | | | | | Under Rails 3.1, you were allowed to pass a hash to a find_or_create method with multiple attribute names, but this was broken as the arguments were being improperly validated.
* Split out most of the AR::Base code into separate modules :cake:Jon Leighton2011-12-151-0/+79