Merge branch 'feature/ruby19' into develop - reportable - Unnamed repository; edit this file 'description' to name the repository. (DIR) Log (DIR) Files (DIR) Refs (DIR) README --- (DIR) commit c3f5deaf9cf23ea4a92bfcfd8e2a59ee39503387 (DIR) parent de8edbd165a5ca726858f3b85f49e6258ed18565 (HTM) Author: Anton Shemerey <shemerey@gmail.com> 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(-) --- (DIR) diff --git a/lib/saulabs/reportable/report_cache.rb b/lib/saulabs/reportable/report_cache.rb @@ -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 (DIR) 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