Sha256: 5791c37f421feb047518894fc5dc90c3c5f104da4987d1219dfd9f3ccb243e14
Contents?: true
Size: 1.25 KB
Versions: 2
Compression:
Stored size: 1.25 KB
Contents
# frozen_string_literal: true require_dependency "decidim/admin/application_controller" module Decidim module Conferences module Admin # Controller that allows to manage the conference users registrations. # class ConferenceRegistrationsController < Decidim::Conferences::Admin::ApplicationController include Concerns::ConferenceAdmin helper_method :conference def index enforce_permission_to :read_conference_registrations, :conference, conference: conference @conference_registrations = Decidim::Conferences::ConferenceRegistration.where(conference: conference).page(params[:page]).per(15) end def export enforce_permission_to :export_conference_registrations, :conference, conference: conference ExportConferenceRegistrations.call(conference, params[:format], current_user) do on(:ok) do |export_data| send_data export_data.read, type: "text/#{export_data.extension}", filename: export_data.filename("conference_registrations") end end end private def conference @conference ||= Decidim::Conference.find_by(slug: params[:conference_slug]) end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems