created_at not date

This commit is contained in:
Andrew Tomaka 2015-04-28 10:21:17 -04:00
parent e20c54fed4
commit a3e88efc2a

View file

@ -18,6 +18,6 @@ class Raid < ActiveRecord::Base
end
def self.soldiers_lost_to_date(date)
where('date < ?', date).sum(:soldiers)
where('created_at < ?', date).sum(:soldiers)
end
end