This query in notices_controller.rb:
Notice.includes(:active_comment_relationship).where(active_comment_relationship: {id: nil} ).limit(50)
is producing this error:
PG::UndefinedTable: ERROR: missing FROM-clause entry for table "active_comment_relationship"
I can't see what's wrong with the code. I've looked at answers like this and as far as I can tell it should be working.
notice.rb:
has_one :active_comment_relationship, class_name: "Commentrelationship",
foreign_key: "commenter_id",
dependent: :destroy
has_one :supernotice, through: :active_comment_relationship, source: :commentee