Changeset 989
- Timestamp:
- 03/23/05 23:39:18 (4 years ago)
- Files:
-
- trunk/activerecord/CHANGELOG (modified) (1 diff)
- trunk/activerecord/lib/active_record/associations.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activerecord/CHANGELOG
r983 r989 1 1 *SVN* 2 3 * Fixed that :counter_cache option would look for a line_items_count column for a LineItem object instead of lineitems_count 2 4 3 5 * Fixed that AR exists?() would explode on postgresql if the passed id did not match the PK type #900 [Scott Barron] trunk/activerecord/lib/active_record/associations.rb
r843 r989 377 377 if options[:counter_cache] 378 378 module_eval( 379 "after_create '#{association_class_name}.increment_counter(\"#{ Inflector.pluralize(self.to_s.downcase).+ "_count"}\", #{association_class_primary_key_name})" +379 "after_create '#{association_class_name}.increment_counter(\"#{self.to_s.underscore.pluralize + "_count"}\", #{association_class_primary_key_name})" + 380 380 " unless #{association_name}.nil?'" 381 381 ) 382 382 383 383 module_eval( 384 "before_destroy '#{association_class_name}.decrement_counter(\"#{ Inflector.pluralize(self.to_s.downcase)+ "_count"}\", #{association_class_primary_key_name})" +384 "before_destroy '#{association_class_name}.decrement_counter(\"#{self.to_s.underscore.pluralize + "_count"}\", #{association_class_primary_key_name})" + 385 385 " unless #{association_name}.nil?'" 386 386 )