Rails models for Users, Offers, Comments, Documents, and Reviews I want to simplify my Rails models, current looks like this:

class User &lt; ActiveRecord::Base
  has_many :offers, dependent: :destroy
  has_many :reviews, dependent: :destroy
  has_many :comments, dependent: :destroy
end

class Offer &lt; ActiveRecord::Base
  belongs_to :user
  has_many :documents, as: :documentable
  has_many :comments, dependent: :destroy
  has_many :reviews, dependent: :destroy
end

class Review &lt; ActiveRecord::Base
  belongs_to :user
  belongs_to :offer
end

class Comment &lt; ActiveRecord::Base
  belongs_to :user
  belongs_to :offer
end

class Document &lt; ActiveRecord::Base
  belongs_to :documentable, polymorphic: true
end


As you can see, I have the same relations on Comment and Review models, but they have some difference in columns, what are the options do I have to minimize the amount of models?
First thing is if they are different treat them different. You can share code with help of interaction or service of some other way may be with active active_interaction. But if you really want to have less table then you may define one single model say Content and this will have a column content_type: integer with default value as 0 and all your other columns then convert the content_type to enum something like below

class Content &lt; ApplicationRecord
  enum content_type: { comment: 0, rating: 1 }
end


this will help you to differentiate between comment and rating. With proper indexing it will make no issue.