lib/decidim/conferences/engine.rb in decidim-conferences-0.15.2 vs lib/decidim/conferences/engine.rb in decidim-conferences-0.16.0
- old
+ new
@@ -1,10 +1,11 @@
# frozen_string_literal: true
require "rails"
require "active_support/all"
require "decidim/core"
+require "wicked_pdf"
module Decidim
module Conferences
# Decidim's Conferences Rails Engine.
class Engine < ::Rails::Engine
@@ -20,16 +21,19 @@
conference = Decidim::Conferences.find(params[:conference_id])
conference ? "/conferences/#{conference.slug}/f/#{params[:component_id]}" : "/404"
}, constraints: { conference_id: /[0-9]+/ }
resources :conferences, only: [:index, :show], param: :slug, path: "conferences" do
+ get :user, to: "conferences#user_diploma"
resources :conference_speakers, only: :index, path: "speakers"
resources :conference_program, only: :show, path: "program"
resource :conference_widget, only: :show, path: "embed"
- resource :conference_registration, only: [:create, :destroy] do
- collection do
- get :create
- get :decline_invitation
+ resources :registration_types, only: :index, path: "registration" do
+ resource :conference_registration, only: [:create, :destroy] do
+ collection do
+ get :create
+ get :decline_invitation
+ end
end
end
resources :media, only: :index
end
scope "/conferences/:conference_slug/f/:component_id" do