Class: Note
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Note
- Defined in:
- lib/my_todo/models/note.rb
Overview
Handles business logic for todo item
Instance Method Summary collapse
-
#tag_created_at ⇒ Object
set created at to the current date.
-
#tag_updated_at ⇒ Object
set updated at to the current date.
Instance Method Details
#tag_created_at ⇒ Object
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_at ⇒ Object
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 |