# frozen_string_literal: true # == Schema Information # # Table name: post_thumbnails # # post_id :bigint not null, primary key # thumbnail_id :integer not null # # Foreign Keys # # fk_rails_... (post_id => posts.id) # fk_rails_... (thumbnail_id => posts.id) # class PostThumbnail < ApplicationRecord belongs_to :post, inverse_of: :thumbnail belongs_to :thumbnail, class_name: 'Post', inverse_of: nil end