diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index d1e3488c1d084409d309125d343e108cdd5fcef2..63d5bbb9ee78d4daff4ca7fee183038b60517c28 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,6 +1,6 @@ ## Rails 4.0.0 (unreleased) ## -* Fix ActiveRecord `subclass_from_attrs` when eager_load is false. +* Fix ActiveRecord `subclass_from_attrs` when `eager_load` is false. It cannot find subclass because all classes are loaded automatically when it needs. @@ -24,7 +24,7 @@ Example: sql = Post.connection.unprepared_statement do - Post.first.comments.to_sql + Post.first.comments.to_sql end *Cédric Fabianski* @@ -106,7 +106,8 @@ Example: class ChangeEnum < ActiveRecord::Migration - self.disable_ddl_transaction! + disable_ddl_transaction! + def up execute "ALTER TYPE model_size ADD VALUE 'new_value'" end diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb index 62e8881c4c76cbdf5eb5a0e932dc3d86fb1b1807..3d71b784e7faec6c14411262391a26ad12073b8b 100644 --- a/activerecord/lib/active_record/migration.rb +++ b/activerecord/lib/active_record/migration.rb @@ -339,7 +339,8 @@ def initialize # you can turn the automatic transactions off. # # class ChangeEnum < ActiveRecord::Migration - # self.disable_ddl_transaction! + # disable_ddl_transaction! + # # def up # execute "ALTER TYPE model_size ADD VALUE 'new_value'" # end