Sha256: d3d8bbb76528e10c1cb70734ff2534b8ea92b97c5181dd3892d414e230d2f900
Contents?: true
Size: 1.13 KB
Versions: 58
Compression:
Stored size: 1.13 KB
Contents
# frozen_string_literal: true module Decidim module Conferences class ConferenceSpeakersController < Decidim::Conferences::ApplicationController include ParticipatorySpaceContext participatory_space_layout only: :index helper_method :collection, :conference def index raise ActionController::RoutingError, "No speakers for this conference " if speakers.empty? enforce_permission_to :list, :speakers redirect_to decidim_conferences.conference_path(current_participatory_space) unless current_user_can_visit_space? end private def speakers @speakers ||= current_participatory_space.speakers end alias collection speakers def current_participatory_space return unless params[:conference_slug] @current_participatory_space ||= OrganizationConferences.new(current_organization).query.where(slug: params[:conference_slug]).or( OrganizationConferences.new(current_organization).query.where(id: params[:conference_slug]) ).first! end def conference current_participatory_space end end end end
Version data entries
58 entries across 58 versions & 1 rubygems