diff options
author | Sean Griffin <sean@thoughtbot.com> | 2015-01-28 09:36:42 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2015-01-28 09:53:38 -0700 |
commit | 56a3d5ec9183a9bcbf140d4102d45e3928f2617a (patch) | |
tree | e83642e06544893dd8747d6f5dad2847ed4ee741 /activerecord/test/schema | |
parent | 58047ebdf3da86a8ed17cb269c5d4d944d1c2d88 (diff) | |
download | rails-56a3d5ec9183a9bcbf140d4102d45e3928f2617a.tar.gz rails-56a3d5ec9183a9bcbf140d4102d45e3928f2617a.tar.bz2 rails-56a3d5ec9183a9bcbf140d4102d45e3928f2617a.zip |
Don't redefine autosave association callbacks in nested attrs
These callbacks will already have been defined when the association was
built. The check against `reflection.autosave` happens at call time, not
at define time, so simply modifying the reflection is sufficient.
Fixes #18704
Diffstat (limited to 'activerecord/test/schema')
-rw-r--r-- | activerecord/test/schema/schema.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb index 21b23d8e0c..1add85cc05 100644 --- a/activerecord/test/schema/schema.rb +++ b/activerecord/test/schema/schema.rb @@ -772,6 +772,7 @@ ActiveRecord::Schema.define do t.column :type, :string t.column :looter_id, :integer t.column :looter_type, :string + t.belongs_to :ship end create_table :tyres, force: true do |t| |