mirror of
https://github.com/hakanensari/frankfurter.git
synced 2024-11-25 04:22:28 +01:00
Filter using an expression
This commit is contained in:
parent
043dd4d4be
commit
39164022e6
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user