Class: Cms::Task

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

Constant Summary collapse

CANT_ASSIGN_MESSAGE =
"must have permission to assign tasks"
CANT_BE_ASSIGNED_MESSAGE =
"must have permission to be assigned tasks"

Instance Method Summary collapse

Instance Method Details

#completed?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'app/models/cms/task.rb', line 33

def completed?
  !!completed_at
end

#mark_as_complete!Object



29
30
31
# File 'app/models/cms/task.rb', line 29

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