Question

I'm running Feed.history but It's raising the error above at the title because of the scope line I use in Feed model:

scope :history, -> { or({:end.ne => nil}, {:end.lt => Time.current}) }

what and why?!!

Était-ce utile?

La solution

Try this

scope :history, where('$or' => [{:end.ne => nil}, {:end.lt => Time.current}])
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top