From c960cb7458a235c6a0c6764930a6ef0d45bcf678 Mon Sep 17 00:00:00 2001 From: Godwin Date: Sun, 27 Jul 2014 12:46:48 -0600 Subject: [PATCH] Workshop test. --- app/controllers/conferences_controller.rb | 9 +++++++++ config/routes.rb | 1 + 2 files changed, 10 insertions(+) diff --git a/app/controllers/conferences_controller.rb b/app/controllers/conferences_controller.rb index 04fdeba..06f9daa 100644 --- a/app/controllers/conferences_controller.rb +++ b/app/controllers/conferences_controller.rb @@ -394,6 +394,15 @@ class ConferencesController < ApplicationController {error: false, next_step: params[:cancel] ? 'cancel' : next_step} end + def workshop_test + set_conference + @register_step = 'new_workshop' + @register_template = 'register_new_workshop' + session[:registration] = {:workshop => [Hash.new]} + session[:registration][:workshop_index] = 0 + render 'show' + end + def register is_post = request.post? || session[:registration_step] set_conference diff --git a/config/routes.rb b/config/routes.rb index ef1adb5..0464de4 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -14,6 +14,7 @@ BikeBike::Application.routes.draw do #resources :workshops, :param => 'slug' #get :register, :param => 'step' #post 'register/next' => 'conferences#register_submit' + get 'register/workshop-test/' => 'conferences#workshop_test' match 'register(/:step)' => 'conferences#register', via: [:get, :post] get 'register/confirm/:confirmation_token' => 'conferences#register_confirm' match 'register/pay-registration/:confirmation_token' => 'conferences#register_pay_registration', via: [:get, :post]