Class: Decidim::Conferences::ConferencesController

Inherits:
ApplicationController show all
Includes:
Paginable, ParticipatorySpaceContext
Defined in:
app/controllers/decidim/conferences/conferences_controller.rb

Overview

A controller that holds the logic to show Conferences in a public layout.

Instance Method Summary collapse

Instance Method Details

#indexObject

Raises:

  • (ActionController::RoutingError)


22
23
24
25
26
# File 'app/controllers/decidim/conferences/conferences_controller.rb', line 22

def index
  raise ActionController::RoutingError, "Not Found" if published_conferences.none?

  enforce_permission_to :list, :conference
end

#showObject



28
29
30
# File 'app/controllers/decidim/conferences/conferences_controller.rb', line 28

def show
  enforce_permission_to :read, :conference, conference: current_participatory_space
end

#user_diplomaObject



32
33
34
# File 'app/controllers/decidim/conferences/conferences_controller.rb', line 32

def user_diploma
  render layout: "decidim/diploma"
end