From 60b23ea1da1c119eaab6d07e5a03cf3b5d5577d4 Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Sat, 14 May 2011 19:40:24 +0100 Subject: CollectionAssociation#merge_target_lists should write to the underlying attributes when copying, rather than using the assignment method --- activerecord/test/models/bulb.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/test/models') diff --git a/activerecord/test/models/bulb.rb b/activerecord/test/models/bulb.rb index 643dcefed3..7d90963720 100644 --- a/activerecord/test/models/bulb.rb +++ b/activerecord/test/models/bulb.rb @@ -11,4 +11,8 @@ class Bulb < ActiveRecord::Base @scope_after_initialize = self.class.scoped end + def color=(color) + self[:color] = color.upcase + "!" + end + end -- cgit v1.2.3