app/commands/decidim/elections/admin/create_answer.rb in decidim-elections-0.26.10 vs app/commands/decidim/elections/admin/create_answer.rb in decidim-elections-0.27.0.rc1
- old
+ new
@@ -3,11 +3,11 @@
module Decidim
module Elections
module Admin
# This command is executed when the user creates an Answer
# from the admin panel.
- class CreateAnswer < Rectify::Command
+ class CreateAnswer < Decidim::Command
include ::Decidim::AttachmentMethods
include ::Decidim::GalleryMethods
def initialize(form)
@form = form
@@ -36,10 +36,10 @@
private
attr_reader :form, :answer, :gallery
def invalid?
- form.election.blocked? || form.invalid?
+ form.election.started? || form.invalid?
end
def create_answer
attributes = {
question: form.question,