Sha256: f2ce276ea2e22a1451e2433ce3923bc261097c96786a1bfc8be331b66678d727
Contents?: true
Size: 687 Bytes
Versions: 26
Compression:
Stored size: 687 Bytes
Contents
# frozen_string_literal: true module Motor class Form < ::Motor::ApplicationRecord audited belongs_to :author, polymorphic: true, optional: true belongs_to :api_config, foreign_key: :api_config_name, primary_key: :name, inverse_of: :form has_many :taggable_tags, as: :taggable, dependent: :destroy has_many :tags, through: :taggable_tags, class_name: 'Motor::Tag' attribute :preferences, default: -> { ActiveSupport::HashWithIndifferentAccess.new } if Rails.version.to_f >= 7.1 serialize :preferences, coder: HashSerializer else serialize :preferences, HashSerializer end scope :active, -> { where(deleted_at: nil) } end end
Version data entries
26 entries across 26 versions & 4 rubygems