Class: Decidim::Debates::Admin::CloseDebateForm
- Inherits:
-
Form
- Object
- Form
- Decidim::Debates::Admin::CloseDebateForm
- 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_at ⇒ Object
20 21 22 |
# File 'app/forms/decidim/debates/admin/close_debate_form.rb', line 20 def closed_at debate&.closed_at || Time.current end |
#debate ⇒ Object
24 25 26 |
# File 'app/forms/decidim/debates/admin/close_debate_form.rb', line 24 def debate @debate ||= Debate.find_by(id:) end |