Class: MerryGoRound::Aggregation

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/merry_go_round/aggregation.rb

Overview

Aggregation is the ActiveRecord store for aggregated data points. You should never create aggregations directly unless you know what you’re doing.

Class Method Summary collapse

Class Method Details

.for_key(key, granularity = MerryGoRound.granularities.first) ⇒ Object



19
20
21
# File 'lib/merry_go_round/aggregation.rb', line 19

def self.for_key(key, granularity = MerryGoRound.granularities.first)
 where('key = ? AND granularity = ?', key, granularity)
end

.table_nameObject



15
16
17
# File 'lib/merry_go_round/aggregation.rb', line 15

def self.table_name
  'merry_go_round_aggregations'
end