Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

warning: Time#succ is obsolete; use time + 1

What is this error all about? I'm running a standard query like so:

time_range = (1.month.ago.beginning_of_month..1.month.ago.end_of_month)


Feed.find(:all, :conditions => ['created_at = ? AND id not in (?)', time_range, [1,2,3]]).count

Any ideas? Thanks

like image 645
AnApprentice Avatar asked May 18 '12 18:05

AnApprentice


1 Answers

I had this problem and the solution was to add "to_date" so that it iterates over the days, like so:

time_range = (1.month.ago.beginning_of_month.to_date..1.month.ago.end_of_month.to_date)
like image 164
Flaviu Avatar answered Oct 26 '22 13:10

Flaviu