Class: Decidim::Conferences::ConferencesController

Inherits:
ApplicationController show all
Includes:
ParticipatorySpaceContext
Defined in:
decidim-conferences/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

Methods included from RegistersPermissions

register_permissions

Methods included from UserBlockedChecker

#check_user_block_status, #check_user_not_blocked

Methods included from NeedsSnippets

#snippets

Methods included from HttpCachingDisabler

#disable_http_caching

Methods included from HasStoredPath

#skip_store_location?, #store_current_location

Methods included from NeedsOrganization

enhance_controller, extended, included

Instance Method Details

#indexObject


20
21
22
23
24
# File 'decidim-conferences/app/controllers/decidim/conferences/conferences_controller.rb', line 20

def index
  redirect_to "/404" if published_conferences.none?

  enforce_permission_to :list, :conference
end

#showObject


26
27
28
# File 'decidim-conferences/app/controllers/decidim/conferences/conferences_controller.rb', line 26

def show
  check_current_user_can_visit_space
end

#user_diplomaObject


30
31
32
# File 'decidim-conferences/app/controllers/decidim/conferences/conferences_controller.rb', line 30

def user_diploma
  render layout: "decidim/diploma"
end