Easily get all days in a week with Rails
Rails includes a handy method on Date to construct a range with all days in the current week.
> Date.parse("2025-07-18").all_week
=> Mon, 14 Jul 2025..Sun, 20 Jul 2025
https://api.rubyonrails.org/classes/DateAndTime/Calculations.html#method-i-all_week
Tweet