Introduction
Introduction Statistics Contact Development Disclaimer Help
v1.3.1 - reportable - Fork of reportable required by WarVox, from hdm/reportabl…
Log
Files
Refs
README
---
commit 38bd74361bc517615c02f441e702166f1b0cb821
parent 1b697477d79a5e17e869b4acc1f6be4330226037
Author: Marco Otte-Witte <[email protected]>
Date: Tue, 5 May 2009 19:46:09 +0200
v1.3.1
Diffstat:
M HISTORY.rdoc | 5 +++++
M generators/reports_as_sparkline_mi… | 15 ++++++---------
M lib/simplabs/reports_as_sparkline/… | 2 +-
3 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/HISTORY.rdoc b/HISTORY.rdoc
@@ -1,3 +1,8 @@
+=== v1.3.1
+
+* fixed migration template
+* fixed data type returned by the report methods
+
=== v1.3
* Fixed another bug where two report runs with different :end_date values woul…
diff --git a/generators/reports_as_sparkline_migration/templates/migration.erb …
@@ -8,7 +8,6 @@ class <%= class_name %> < ActiveRecord::Migration
t.string :aggregation, :null => false
t.float :value, :null => false, :default => 0
t.datetime :reporting_period, :null => false
- t.integer :run_limit, :null => false
t.timestamps
end
@@ -17,22 +16,20 @@ class <%= class_name %> < ActiveRecord::Migration
:model_name,
:report_name,
:grouping,
- :aggregation,
- :run_limit
- ], :name => :name_model_grouping_agregation_run_limit
+ :aggregation
+ ], :name => :name_model_grouping_agregation
add_index :reports_as_sparkline_cache, [
:model_name,
:report_name,
:grouping,
:aggregation,
- :reporting_period,
- :run_limit
- ], :unique => true, :name => :name_model_grouping_aggregation_period_run_l…
+ :reporting_period
+ ], :unique => true, :name => :name_model_grouping_aggregation_period
end
def self.down
- remove_index :reports_as_sparkline_cache, :name => :name_model_grouping_ag…
- remove_index :reports_as_sparkline_cache, :name => :name_model_grouping_ag…
+ remove_index :reports_as_sparkline_cache, :name => :name_model_grouping_ag…
+ remove_index :reports_as_sparkline_cache, :name => :name_model_grouping_ag…
drop_table :reports_as_sparkline_cache
end
diff --git a/lib/simplabs/reports_as_sparkline/report_cache.rb b/lib/simplabs/r…
@@ -52,7 +52,7 @@ module Simplabs #:nodoc:
result = []
while reporting_period < (options[:end_date] ? ReportingPeriod.new(o…
if cached = cached_data.find { |cached| reporting_period == cached…
- result << cached
+ result << [cached[0].date_time, cached[1]]
else
new_cached = build_cached_data(report, options[:grouping], repor…
new_cached.save! if cache
You are viewing proxied material from jay.scot. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.