2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-03-04 01:15:08 +08:00
discourse/app/models/post_detail.rb
Jarek Radosz 71834c898f
DEV: Update rubocop-discourse to 3.13 and autofix issues (#35073)
Co-authored-by: Loïc Guitaut <loic@discourse.org>
2025-10-06 16:11:01 +02:00

25 lines
542 B
Ruby

# frozen_string_literal: true
class PostDetail < ActiveRecord::Base
belongs_to :post
validates :key, :value, presence: true
validates :key, uniqueness: { scope: :post_id }
end
# == Schema Information
#
# Table name: post_details
#
# id :integer not null, primary key
# post_id :integer
# key :string
# value :string
# extra :text
# created_at :datetime not null
# updated_at :datetime not null
#
# Indexes
#
# index_post_details_on_post_id_and_key (post_id,key) UNIQUE
#