Sha256: fc4fb58dbd96665df71642b0e2439714a90f3c9fe35fa6148a03b9f84f247493
Contents?: true
Size: 455 Bytes
Versions: 5
Compression:
Stored size: 455 Bytes
Contents
# frozen_string_literal: true module Archangel ## # Entry model # class Entry < ApplicationRecord acts_as_paranoid serialize :value, JSON acts_as_list scope: :collection_id, top_of_list: 0, add_new_at: :top validates :collection_id, presence: true validates :available_at, allow_blank: true, date: true validates :value, presence: true belongs_to :collection default_scope { order(position: :asc) } end end
Version data entries
5 entries across 5 versions & 1 rubygems