Revert "Filter using an expression"

This reverts commit 39164022e6.
This commit is contained in:
hakanensari 2014-03-17 10:14:26 +00:00
parent 0931da3add
commit 8d007357b1

View File

@ -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