Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'feature/ruby19' into develop

  • Loading branch information...
commit c3f5deaf9cf23ea4a92bfcfd8e2a59ee39503387 2 parents de8edbd + 48a9e90
@shemerey shemerey authored
Showing with 6 additions and 6 deletions.
  1. +4 −4 lib/saulabs/reportable/report_cache.rb
  2. +2 −2 spec/db/database.yml
View
8 lib/saulabs/reportable/report_cache.rb
@@ -115,13 +115,13 @@ def self.build_cached_data(report, grouping, conditions, reporting_period, value
: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
View
4 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
+ host: localhost
Please sign in to comment.
Something went wrong with that request. Please try again.