title: ActiveRecord::StatementInvalid PG::UndefinedColumn: ERROR
body: <p>I am using rails_admin for admin panel. Just change association in Image model</p>
  
  <p>From this</p>
  
  <pre><code>class Image &lt; ApplicationRecord
     belongs_to :user 
     belongs_to :product 
  end
  </code></pre>
  
  <p>to this</p>
  
  <pre><code>class Image &lt; ApplicationRecord
     has_one :user 
     has_one :product 
  end
  </code></pre>
  
  <p>and User model is</p>
  
  <pre><code>class User &lt; ApplicationRecord
     has_many :images,dependent: :destroy
  end
  </code></pre>
  
  <p>Getting this error when I try to edit user from admin panel.From other side it is working fine. </p>
  
  <pre><code>ActiveRecord::StatementInvalid at /user/72/edit
  
  PG::UndefinedColumn: ERROR:  column users.image_id does not exist
  LINE 1: SELECT  "users".* FROM "users" WHERE "users"."image_id" = $1...
                                           ^
  : SELECT  "users".* FROM "users" WHERE "users"."image_id" = $1 LIMIT $2
  </code></pre>