otwarchive-symphonyarchive/app/models/wrangling_guideline.rb

12 lines
417 B
Ruby
Raw Permalink Normal View History

2026-03-11 22:22:11 +00:00
class WranglingGuideline < ApplicationRecord
acts_as_list
validates_presence_of :content, :title
validates_length_of :content, maximum: ArchiveConfig.CONTENT_MAX,
too_long: ts('cannot be more than %{max} characters long.', max: ArchiveConfig.CONTENT_MAX)
def self.reorder_list(positions)
SortableList.new(self.all.order(position: :asc)).reorder_list(positions)
end
end