aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
Diffstat (limited to 'railties')
-rw-r--r--railties/configs/initializers/new_in_rails_3.rb5
-rw-r--r--railties/lib/rails_generator/generators/applications/app/app_generator.rb3
2 files changed, 7 insertions, 1 deletions
diff --git a/railties/configs/initializers/new_in_rails_3.rb b/railties/configs/initializers/new_in_rails_3.rb
new file mode 100644
index 0000000000..0cc1993ed9
--- /dev/null
+++ b/railties/configs/initializers/new_in_rails_3.rb
@@ -0,0 +1,5 @@
+# These settins 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
diff --git a/railties/lib/rails_generator/generators/applications/app/app_generator.rb b/railties/lib/rails_generator/generators/applications/app/app_generator.rb
index fc4ac8eb01..359726ff01 100644
--- a/railties/lib/rails_generator/generators/applications/app/app_generator.rb
+++ b/railties/lib/rails_generator/generators/applications/app/app_generator.rb
@@ -61,7 +61,8 @@ class AppGenerator < Rails::Generator::Base
# Initializers
m.template "configs/initializers/inflections.rb", "config/initializers/inflections.rb"
- m.template "configs/initializers/mime_types.rb", "config/initializers/mime_types.rb"
+ m.template "configs/initializers/mime_types.rb", "config/initializers/mime_types.rb"
+ m.template "configs/initializers/new_in_rails_3.rb", "config/initializers/new_in_rails_3.rb"
# Environments
m.file "environments/boot.rb", "config/boot.rb"