Sha256: bcd0bc757b503827edb1cde129064cbd97db53c78d9b788dc95c49cb4631123b
Contents?: true
Size: 459 Bytes
Versions: 5
Compression:
Stored size: 459 Bytes
Contents
class Issue < ActiveRecord::Base include ReportsKit::Model belongs_to :repo has_many :issues_labels has_many :labels, through: :issues_labels has_many :tags reports_kit do aggregation :average_duration, [:average, REPORTS_KIT_DATABASE_TYPE == :mysql ? 'DATEDIFF(closed_at, opened_at)' : '(closed_at::date - opened_at::date)'] dimension :titleized_state, group: 'issues.state', key_to_label: -> (state) { state.try(:titleize) } end end
Version data entries
5 entries across 5 versions & 1 rubygems