add option to pre register to events

This commit is contained in:
differentreality 2013-07-11 07:43:52 +03:00
parent 8286c8130d
commit 750e31c11a
7 changed files with 28 additions and 2 deletions

View file

@ -4,6 +4,7 @@ class ConferenceRegistrationController < ApplicationController
def register
# TODO Figure out how to change the route's id from :id to :conference_id
@conference = Conference.find_all_by_short_title(params[:id]).first
@workshops = @conference.events.where("require_registration = ? AND state LIKE ?", true, 'confirmed')
@person = current_user.person
if @person.first_name.blank? || @person.last_name.blank?
redirect_to(edit_user_registration_path, :alert => "Please fill in your first and last name before registering.")