Sha256: 4bfde8fb3c8499a71b8aa225fda9506dfd28719fbe98a0077eccc1b08a52c6de

Contents?: true

Size: 369 Bytes

Versions: 3

Compression:

Stored size: 369 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 to_param
      [id, name.gsub("'", "").parameterize].join("-")
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
blazer-2.2.2 app/models/blazer/dashboard.rb
blazer-2.2.1 app/models/blazer/dashboard.rb
blazer-2.2.0 app/models/blazer/dashboard.rb