Subscriptions
canceled_at: ["2017-04-07T09:52:17-05:00", "2017-04-01T09:52:17-05:00"]
Canceled_at is an array of strings. Each element is a DateTime converted to a string.
Above is my subscriptions table. I am trying to query through and find records that have a canceled_at date within a given week.
date = Date.today
Subscription.where("ANY subscriptions.canceled_at
BETWEEN '#{date.beginning_of_week(:sunday)}'
AND '#{date.end_of_week(:sunday)}'"
ruby 2.3.1p112