diff --git a/app/controllers/public/events_controller.rb b/app/controllers/public/events_controller.rb index 0142e1e..d3e3f4d 100644 --- a/app/controllers/public/events_controller.rb +++ b/app/controllers/public/events_controller.rb @@ -17,7 +17,7 @@ module Public @event.participations.build participant: current_user, approved: true if @event.save - redirect_to action: :index + after_save_redirect else render action: :new end @@ -32,5 +32,13 @@ module Public :event_type_id ) end + + def after_save_redirect + if current_user.personal_profile(current_conference).present? + redirect_to root_path + else + redirect_to new_personal_profile_path, alert: I18n.t(:please_fill_in_your_speaker_profile) + end + end end end