I have a DailyQuote model in my rails application which has a date and price for a stock. Data in the database has been captured for this model
weekend_days = [0,6] if (self.start_date.to_date..self.end_date.to_date).to_a.select {|k| weekend_days.include?(k.wday)}.present? # you code end