Class: Note

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/my_todo/models/note.rb

Overview

Handles business logic for todo item

Author:

  • Lovell McIlwain#

Instance Method Summary collapse

Instance Method Details

#tag_created_atObject

set created at to the current date



20
21
22
# File 'lib/my_todo/models/note.rb', line 20

def tag_created_at
  self.created_at = Date.today
end

#tag_updated_atObject

set updated at to the current date



25
26
27
# File 'lib/my_todo/models/note.rb', line 25

def tag_updated_at
  self.updated_at = Date.today if changes.size > 0
end