Class: Decidim::Meetings::AgendaItem

Inherits:
ApplicationRecord show all
Includes:
Loggable, Traceable, TranslatableResource
Defined in:
decidim-meetings/app/models/decidim/meetings/agenda_item.rb

Overview

The data store for a AgendaItem in the Decidim::Meetings component. It stores a title, description and duration to render inside meeting.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.agenda_item_childrenObject



29
30
31
# File 'decidim-meetings/app/models/decidim/meetings/agenda_item.rb', line 29

def self.agenda_item_children
  where.not(parent_id: nil)
end

.first_classObject



21
22
23
# File 'decidim-meetings/app/models/decidim/meetings/agenda_item.rb', line 21

def self.first_class
  where(parent_id: nil)
end

.log_presenter_class_for(_log) ⇒ Object



33
34
35
# File 'decidim-meetings/app/models/decidim/meetings/agenda_item.rb', line 33

def self.log_presenter_class_for(_log)
  Decidim::Meetings::AdminLog::AgendaItemPresenter
end

Instance Method Details

#parent?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'decidim-meetings/app/models/decidim/meetings/agenda_item.rb', line 25

def parent?
  return true unless parent_id
end