diff --git a/app/models/person.rb b/app/models/person.rb index 4a7d740..5c2db0a 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -293,8 +293,7 @@ class Person < Profile end after_update do |person| - # FIXME: causes infinite loop with rails4 - #person.user.save! + person.user.save! end def is_admin?(environment = nil) diff --git a/app/models/user.rb b/app/models/user.rb index 8d6903d..d5d954f 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -85,7 +85,8 @@ class User < ActiveRecord::Base end end - has_one :person, :dependent => :destroy + # set autosave to false as we do manually when needed and Person syncs with us + has_one :person, dependent: :destroy, autosave: false belongs_to :environment attr_protected :activated_at -- libgit2 0.21.2