Improve Registration Flow Some:
* Trying to register when a ticket is required will now redirect you to buy tickets. * #64 will then redirect you back to complete the registration
This commit is contained in:
parent
62dd99b263
commit
d4a2861051
3 changed files with 7 additions and 3 deletions
|
|
@ -64,6 +64,9 @@ class ConferenceRegistrationsController < ApplicationController
|
|||
redirect_to conference_conference_registration_path(@conference.short_title),
|
||||
notice: 'You are now registered and will be receiving E-Mail notifications.'
|
||||
end
|
||||
elsif @conference.registration_ticket_required? && !current_user.supports?(@conference)
|
||||
redirect_to conference_tickets_path(@conference.short_title),
|
||||
error: 'You must buy a registration ticket before registering.'
|
||||
else
|
||||
flash.now[:error] = "Could not create your registration for #{@conference.title}: "\
|
||||
"#{@registration.errors.full_messages.join('. ')}."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue