Use update_attribute
. Also, You don't have to use instance variables in your notify method
class Holiday < ActiveRecord::Base
belongs_to :user
def self.notify
holidays = Holiday.all
today = DateTime.now.to_date
holidays.each do |holiday|
if holiday.notified == false && (holiday.fecha - today).to_i < 15
clients = holiday.user.clients
clients.each do |client|
ReminderMailer.new_holiday_reminder(holiday, client).deliver
end
holiday.update_attribute(:notified, true) #or holiday.update_attributes(:notified => true)
end
end
end
end