From 888d5059bdb71e6d034d0c09d7e3b3e235fd8507 Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Thu, 22 May 2008 19:28:52 +1200 Subject: Return Partial Updates to be purely opt in to prevent users from inadvertently corrupting data. --- railties/configs/initializers/new_rails_defaults.rb | 3 --- 1 file changed, 3 deletions(-) (limited to 'railties') diff --git a/railties/configs/initializers/new_rails_defaults.rb b/railties/configs/initializers/new_rails_defaults.rb index 1a718608ae..b959c6d549 100644 --- a/railties/configs/initializers/new_rails_defaults.rb +++ b/railties/configs/initializers/new_rails_defaults.rb @@ -1,9 +1,6 @@ # These settings change the behavior of Rails 2 apps and will be defaults # for Rails 3. You can remove this initializer when Rails 3 is released. -# Only save the attributes that have changed since the record was loaded. -ActiveRecord::Base.partial_updates = true - # Include ActiveRecord class name as root for JSON serialized output. ActiveRecord::Base.include_root_in_json = true -- cgit v1.2.3 From 5b8d0f134a5766aa1b3d0945b79f04d2bb911c02 Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Fri, 23 May 2008 09:07:38 +1200 Subject: Mention partial updates in environment.rb to make it easier for people to opt-in if they know it's safe --- railties/environments/environment.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'railties') diff --git a/railties/environments/environment.rb b/railties/environments/environment.rb index c33b80da4f..d03447e1d3 100644 --- a/railties/environments/environment.rb +++ b/railties/environments/environment.rb @@ -64,4 +64,7 @@ Rails::Initializer.run do |config| # Activate observers that should always be running # config.active_record.observers = :cacher, :garbage_collector + + # Make ActiveRecord only save the attributes that have changed since the record was loaded. + # config.active_record.partial_updates = true end \ No newline at end of file -- cgit v1.2.3