Class: Board

Inherits:
ApplicationRecord show all
Defined in:
app/models/board.rb

Instance Method Summary collapse

Methods inherited from ApplicationRecord

at_most, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, underscore, without_order

Instance Method Details

#backlog_listObject


36
37
38
# File 'app/models/board.rb', line 36

def backlog_list
  lists.merge(List.backlog).take
end

#closed_listObject


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

def closed_list
  lists.merge(List.closed).take
end

#group_board?Boolean

Returns:

  • (Boolean)

28
29
30
# File 'app/models/board.rb', line 28

def group_board?
  group_id.present?
end

#project_board?Boolean

Returns:

  • (Boolean)

32
33
34
# File 'app/models/board.rb', line 32

def project_board?
  project_id.present?
end

#project_needed?Boolean

Returns:

  • (Boolean)

20
21
22
# File 'app/models/board.rb', line 20

def project_needed?
  !group
end

#resource_parentObject


24
25
26
# File 'app/models/board.rb', line 24

def resource_parent
  @resource_parent ||= group || project
end

#scoped?Boolean

Returns:

  • (Boolean)

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

def scoped?
  false
end