If I have a class in Rails:
class Ticket < ActiveRecord::Base
def update_status
return if status == 'sold'
return unless reserved_until.nil? || reserved_until.past?
self.status = 'open'
end
end
where status and reserved_until are fields in the database for the Ticket model, why do I only have to use self when I am assigning a value?