Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (13 sloc) 432 Bytes
# DID YOU MEAN: Topic?
# "Policy area" is the newer name for "topic"
# (https://www.gov.uk/government/topics)
# "Topic" is the newer name for "specialist sector"
# (https://www.gov.uk/topic)
class SpecialistSector < ApplicationRecord
belongs_to :edition
validates :edition, presence: true
validates :topic_content_id, presence: true, uniqueness: { scope: :edition_id }
def edition
Edition.unscoped { super }
end
end