Sha256: 01708d8052d3e117ec21efa2be4c6ffb27dd73082a624f5df323c5559bf349c6
Contents?: true
Size: 1.01 KB
Versions: 73
Compression:
Stored size: 1.01 KB
Contents
# frozen_string_literal: true module Decidim module Conferences module Admin # Controller that allows managing conferences. # class ConferenceCopiesController < Decidim::Conferences::Admin::ApplicationController include Concerns::ConferenceAdmin def new enforce_permission_to :create, :conference @form = form(ConferenceCopyForm).from_model(current_conference) end def create enforce_permission_to :create, :conference @form = form(ConferenceCopyForm).from_params(params) CopyConference.call(@form, current_conference) do on(:ok) do flash[:notice] = I18n.t("conferences_copies.create.success", scope: "decidim.admin") redirect_to conferences_path end on(:invalid) do flash.now[:alert] = I18n.t("conferences_copies.create.error", scope: "decidim.admin") render :new end end end end end end end
Version data entries
73 entries across 73 versions & 1 rubygems