Class: Task

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Cms::DomainSupport
Defined in:
app/models/task.rb

Instance Method Summary collapse

Instance Method Details

#completed?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'app/models/task.rb', line 26

def completed?
  !!completed_at
end

#mark_as_complete!Object



22
23
24
# File 'app/models/task.rb', line 22

def mark_as_complete!
  update_attributes(:completed_at => Time.now)
end