Rails active record throws the following error.
irb(main):030:0* Subscription.where(valid_until: nil).where.not(activated_on: nil)
ArgumentError: wrong number of arguments (given 0, expected 1+)
There are 5 nil entries for valid_until
irb(main):032:0> Subscription.where(valid_until: nil).count
2017-05-02 19:03:43.867 [MEH] (0.6ms) SELECT COUNT(*) FROM "pti_subscriptions" WHERE "pti_subscriptions"."valid_until" IS NULL
=> 5
The problem is with where.not. Any ideas?
Aucun commentaire:
Enregistrer un commentaire