| also accept time objects when instantiating reporting periods directly - report… | |
| Log | |
| Files | |
| Refs | |
| README | |
| --- | |
| commit 0015f8c4ef67243121f89818c851a203bd044394 | |
| parent c02ee2af6bde90fc905d662e5d754466900a3ada | |
| Author: Michi Huber <[email protected]> | |
| Date: Mon, 5 Aug 2013 22:11:12 +0200 | |
| also accept time objects when instantiating reporting periods directly | |
| Diffstat: | |
| M lib/saulabs/reportable/reporting_p… | 2 +- | |
| 1 file changed, 1 insertion(+), 1 deletion(-) | |
| --- | |
| diff --git a/lib/saulabs/reportable/reporting_period.rb b/lib/saulabs/reportabl… | |
| @@ -70,7 +70,7 @@ module Saulabs | |
| # the reporting period for the {Saulabs::Reportable::Grouping} as pars… | |
| # | |
| def self.from_db_string(grouping, db_string) | |
| - return self.new(grouping, db_string) if db_string.is_a?(Date) | |
| + return self.new(grouping, db_string) if db_string.is_a?(Date) || db_st… | |
| parts = grouping.date_parts_from_db_string(db_string.to_s) | |
| case grouping.identifier | |
| when :hour |