app/commands/decidim/votings/admin/create_ballot_style.rb in decidim-elections-0.25.2 vs app/commands/decidim/votings/admin/create_ballot_style.rb in decidim-elections-0.26.0.rc1
- old
+ new
@@ -32,16 +32,19 @@
private
attr_reader :form, :ballot_style
def create_ballot_style!
- attributes = {
- code: form.code
+ params = {
+ code: form.code,
+ voting: form.current_participatory_space
}
- @ballot_style = Decidim::Votings::BallotStyle.create!(
- voting: form.current_participatory_space,
- attributes: attributes
+ @ballot_style = Decidim.traceability.create!(
+ Decidim::Votings::BallotStyle,
+ form.current_user,
+ params,
+ visibility: "all"
)
end
def create_ballot_style_questions!
form.question_ids.each do |question_id|