Sha256: 752596ecd147ece5bad49bab664fa6e96dd094553031035385a6eb13fb25ba6e
Contents?: true
Size: 444 Bytes
Versions: 38
Compression:
Stored size: 444 Bytes
Contents
module Blazer class Dashboard < Record belongs_to :creator, optional: true, class_name: Blazer.user_class.to_s if Blazer.user_class has_many :dashboard_queries, dependent: :destroy has_many :queries, through: :dashboard_queries validates :name, presence: true def variables queries.flat_map { |q| q.variables }.uniq end def to_param [id, name.gsub("'", "").parameterize].join("-") end end end
Version data entries
38 entries across 38 versions & 3 rubygems