a11yist/app/models/guideline.rb

19 lines
307 B
Ruby
Raw Permalink Normal View History

2025-05-16 19:02:33 +02:00
class Guideline < ApplicationRecord
belongs_to :principle
has_many :checks
has_rich_text :description_de
has_rich_text :description_en
translates_attributes :name, :description
def to_s
"#{full_number} #{t_name}"
end
def full_number
[ principle.id, number ].join(".")
end
end