Sending emails on user-selected dates
问题 My app involves people coming to a home page, entering a name of a bet they've made (for fun), their email address, a date they would like to be reminded, and some details about the bet. I am using the whenever gem to have this run once a day. bet.rb class Bet < ActiveRecord::Base attr_accessible :details, :email, :name, :reminder, :sent # Sends user a reminder if current_date is equal to the reminder date of the bet def check_bet current_date = Time.now.strftime("%Y-%m-%d").to_s @bets = Bet