Class: ActiveRecord::Relation

Inherits:
Object
  • Object
show all
Defined in:
lib/calculon/ext.rb

Instance Method Summary collapse

Instance Method Details

#to_bucketsObject



7
8
9
10
11
12
# File 'lib/calculon/ext.rb', line 7

def to_buckets
  if calculon_opts.nil?
    raise "Not a Calculon Relation: You must call by_day/by_hour/etc before you can call to_buckets"
  end
  Calculon::Results.create(self)
end