Class: Decidim::Debates::Admin::CloseDebateForm

Inherits:
Form
  • Object
show all
Includes:
TranslatableAttributes
Defined in:
app/forms/decidim/debates/admin/close_debate_form.rb

Overview

This class holds a Form to close debates from Decidim’s admin views.

Instance Method Summary collapse

Instance Method Details

#closed_atObject



20
21
22
# File 'app/forms/decidim/debates/admin/close_debate_form.rb', line 20

def closed_at
  debate&.closed_at || Time.current
end

#debateObject



24
25
26
# File 'app/forms/decidim/debates/admin/close_debate_form.rb', line 24

def debate
  @debate ||= Debate.find_by(id:)
end