Sha256: 29b8fa5ca8322300768f97620d9097f5f32e83c5991d531e7bb0edeaf4012b6c
Contents?: true
Size: 494 Bytes
Versions: 9
Compression:
Stored size: 494 Bytes
Contents
# frozen_string_literal: true module Motor class Dashboard < ::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' serialize :preferences, HashSerializer scope :active, -> { where(deleted_at: nil) } def queries Motor::Query.where(id: preferences[:layout].pluck(:query_id)) end end end
Version data entries
9 entries across 9 versions & 1 rubygems