aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/counter_cache.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* RefactorSantiago Pastorino2012-10-031-5/+4
|
* Fix reset_counters() crashing on has_many :through associations.lulalala2012-10-021-2/+7
| | | | | The counter column name in the intermediate model need to be access via the through reflection.
* reset_counters() was crashing when there were multiple belongs_to ↵Dave Desrochers2012-08-211-1/+1
| | | | | | associations with the same foreign key. This closes #5200.
* Simplify AR configuration code.Jon Leighton2012-06-151-98/+102
| | | | | Get rid of ActiveModel::Configuration, make better use of ActiveSupport::Concern + class_attribute, etc.
* remove deprecate #update_all usageJon Leighton2012-04-261-1/+1
|
* Remove IdentityMapCarlos Antonio da Silva2012-03-131-2/+0
|
* Refactor and cleanup in some ActiveRecord modulesCarlos Antonio da Silva2012-03-031-1/+1
| | | | | | | | | | | * 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
* Remove not used if..else clauseCarlos Antonio da Silva2012-01-231-6/+0
| | | | Related to #4614.
* Unused var removedArun Agrawal2012-01-231-1/+1
|
* Fix bug where reset_counters resets the wrong counter cache.David Peter2012-01-161-1/+2
| | | | | | | | If a model belongs_to two associations with the same class, then reset_counters will reset the wrong counter cache. Finding the right reflection should use the foreign_key instead, which should be unique.
* Remove unnecessary comma.Uģis Ozols2011-12-261-1/+1
|
* Make it the responsibility of the connection to hold onto an ARel visitor ↵Jon Leighton2011-08-081-1/+1
| | | | for generating SQL. This improves the code architecture generally, and solves some problems with marshalling. Adapter authors please take note: you now need to define an Adapter.visitor_for method, but it degrades gracefully with a deprecation warning for now.
* Remove extra white spaces on ActiveRecord docs.Sebastian Martinez2011-05-231-1/+1
|
* Merge remote branch 'rails/master' into identity_mapEmilio Tagua2010-12-201-1/+2
|\ | | | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/associations/association_proxy.rb activerecord/lib/active_record/autosave_association.rb activerecord/lib/active_record/base.rb activerecord/lib/active_record/persistence.rb
| * removing more calls to deprecated methodsAaron Patterson2010-12-021-1/+2
| |
* | Added method to IM to remove objects by class and id. Then used it to remove ↵Emilio Tagua2010-11-191-0/+2
|/ | | | objects when updating counters.
* Use COALESCE in update_counters docs to reflect the implementationCarlos Antonio da Silva2010-08-181-3/+3
|
* Refactor previous commits a bit.José Valim2010-07-081-7/+10
|
* reset_counter should work with non-traditional belongs_to and polymorphic ↵Neeraj Singh2010-07-081-3/+9
| | | | | | | | belongs_to [#4984 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Adds title and basic description where needed.Rizwan Reza2010-06-151-0/+1
|
* fix `reset_counters` to work even with complex class namesMislav Marohnić2010-05-241-4/+6
| | | | | | e.g. it guesses that a belongs_to association to Namespace::MyModel is named "my_model", unlike before where it would look up an association named "namespace::mymodel" and fail.
* cleanup `update/reset_counters`: less SQL strings, more ActiveRecord/ArelMislav Marohnić2010-05-241-12/+8
|
* eliminate alias_method_chain from ActiveRecordwycats2010-05-091-0/+107