title: Rails polymorphic association error on user destroy
body: <p>I'm trying to link notifications to users like so. </p>
  
  <pre><code>  belongs_to :notified_by, class_name: 'User'
  </code></pre>
  
  <p>My user has_many notifications. </p>
  
  <pre><code>  has_many :notifications, dependent: :delete_all
  </code></pre>
  
  <p>The problem is, when I try to destroy a user, I get an error when it goes to delete all the notifications. </p>
  
  <pre><code>ActiveRecord::StatementInvalid (PG::UndefinedColumn: ERROR:  column notifications.user_id does not exist)
  LINE 1: DELETE FROM "notifications" WHERE "notifications"."user_id" ...
  </code></pre>
  
  <p>There is no user_id in the Notifications table, just a notified_by_id. I have tried using that in place of notified_by, but that didn't work either. </p>