Sha256: 76a0a6d23e7f7fdef6f6393a879e3855ba18074e35dc8ecbf9b90d10cfaae8af

Contents?: true

Size: 470 Bytes

Versions: 92

Compression:

Stored size: 470 Bytes

Contents

# frozen_string_literal: true

module Motor
  class Form < ::Motor::ApplicationRecord
    audited

    belongs_to :author, polymorphic: true, optional: true

    has_many :taggable_tags, as: :taggable, dependent: :destroy
    has_many :tags, through: :taggable_tags, class_name: 'Motor::Tag'

    attribute :preferences, default: -> { HashWithIndifferentAccess.new }
    serialize :preferences, HashSerializer

    scope :active, -> { where(deleted_at: nil) }
  end
end

Version data entries

92 entries across 92 versions & 1 rubygems

Version Path
motor-admin-0.2.41 app/models/motor/form.rb
motor-admin-0.2.39 app/models/motor/form.rb
motor-admin-0.2.38 app/models/motor/form.rb
motor-admin-0.2.37 app/models/motor/form.rb
motor-admin-0.2.36 app/models/motor/form.rb
motor-admin-0.2.35 app/models/motor/form.rb
motor-admin-0.2.34 app/models/motor/form.rb
motor-admin-0.2.33 app/models/motor/form.rb
motor-admin-0.2.32 app/models/motor/form.rb
motor-admin-0.2.31 app/models/motor/form.rb
motor-admin-0.2.30 app/models/motor/form.rb
motor-admin-0.2.29 app/models/motor/form.rb
motor-admin-0.2.28 app/models/motor/form.rb
motor-admin-0.2.27 app/models/motor/form.rb
motor-admin-0.2.26 app/models/motor/form.rb
motor-admin-0.2.25 app/models/motor/form.rb
motor-admin-0.2.24 app/models/motor/form.rb
motor-admin-0.2.23 app/models/motor/form.rb
motor-admin-0.2.22 app/models/motor/form.rb
motor-admin-0.2.21 app/models/motor/form.rb