Commit 9b404dbe5d0a8cf64aef97cc05f24a77e6828280
1 parent
c9e6851d
Exists in
master
and in
20 other branches
rails4: disable autosave on person association
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
app/models/person.rb
app/models/user.rb
... | ... | @@ -85,7 +85,8 @@ class User < ActiveRecord::Base |
85 | 85 | end |
86 | 86 | end |
87 | 87 | |
88 | - has_one :person, :dependent => :destroy | |
88 | + # set autosave to false as we do manually when needed and Person syncs with us | |
89 | + has_one :person, dependent: :destroy, autosave: false | |
89 | 90 | belongs_to :environment |
90 | 91 | |
91 | 92 | attr_protected :activated_at | ... | ... |