From 8d007357b1d6315b5b353062783b82ca2ade5b15 Mon Sep 17 00:00:00 2001 From: hakanensari Date: Mon, 17 Mar 2014 10:14:26 +0000 Subject: [PATCH] Revert "Filter using an expression" This reverts commit 39164022e6b2ca3f1d7ca3b5c6a407f7dc656b90. --- lib/snapshot.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/snapshot.rb b/lib/snapshot.rb index 2ddccd3..42a4e3d 100644 --- a/lib/snapshot.rb +++ b/lib/snapshot.rb @@ -9,7 +9,7 @@ class Snapshot def quote self.date = if date - Currency.where{date <= date}.order(:date).last.date + Currency.where("date <= '#{date}'").order(:date).last.date else Currency.last_date end