Class: Context

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
AASM
Defined in:
app/models/context.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.null_objectObject


40
41
42
# File 'app/models/context.rb', line 40

def self.null_object
  NullContext.new
end

Instance Method Details

#new_record_before_save?Boolean

Returns:

  • (Boolean)

48
49
50
# File 'app/models/context.rb', line 48

def new_record_before_save?
  @new_record_before_save
end

#no_active_todos?Boolean

Returns:

  • (Boolean)

52
53
54
# File 'app/models/context.rb', line 52

def no_active_todos?
  return todos.active.count == 0
end

#titleObject


44
45
46
# File 'app/models/context.rb', line 44

def title
  name
end