Introduction
Introduction Statistics Contact Development Disclaimer Help
Merge branch 'feature/ruby19' into develop - reportable - Fork of reportable re…
Log
Files
Refs
README
---
commit c3f5deaf9cf23ea4a92bfcfd8e2a59ee39503387
parent de8edbd165a5ca726858f3b85f49e6258ed18565
Author: Anton Shemerey <[email protected]>
Date: Mon, 14 Mar 2011 15:26:57 +0200
Merge branch 'feature/ruby19' into develop
Diffstat:
M lib/saulabs/reportable/report_cach… | 8 ++++----
M spec/db/database.yml | 5 ++---
2 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/lib/saulabs/reportable/report_cache.rb b/lib/saulabs/reportable/re…
@@ -115,13 +115,13 @@ module Saulabs
:value => value
)
end
-
+
def self.serialize_conditions(conditions)
- if conditions.is_a?(Array)
+ if conditions.is_a?(Array) && conditions.any?
conditions.join
- elsif conditions.is_a?(Hash)
+ elsif conditions.is_a?(Hash) && conditions.any?
conditions.map.sort{|x,y|x.to_s<=>y.to_s}.flatten.join
- else
+ else
conditions.to_s
end
end
diff --git a/spec/db/database.yml b/spec/db/database.yml
@@ -1,6 +1,6 @@
sqlite3:
adapter: sqlite3
- database: spec/db/reportable.sqlite3.db
+ database: ":memory:"
mysql:
adapter: mysql
database: reportable_test
@@ -12,4 +12,4 @@ postgresql:
database: reportable_test
username: reportable
password: reportable
- host: localhost
-\ No newline at end of file
+ host: localhost
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.