6 lines
245 B
Ruby
6 lines
245 B
Ruby
class Checklist < ApplicationRecord
|
|
has_many :checklist_entries, -> { order(position: :asc) }, dependent: :destroy, inverse_of: :checklist
|
|
has_many :checks, through: :checklist_entries
|
|
|
|
accepts_nested_attributes_for :checklist_entries
|
|
end
|