Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

if there is only one valid conference immediately set it as active co…

…nference
  • Loading branch information...
commit 6b46620bf49dae84c1473e4486bb1f6b904bef96 1 parent 9a402a5
@nevs authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 rails/app/controllers/conference_controller.rb
View
8 rails/app/controllers/conference_controller.rb
@@ -5,8 +5,14 @@ class ConferenceController < ApplicationController
around_filter :update_last_login, :except=>[:copy,:delete,:select]
def select
+ valid_conferences = POPE.conferences_with_permission(:'pentabarf::login')
+ if valid_conferences.length == 1
+ # if there is only one valid conference immediately set it as active conference
+ POPE.user.current_conference_id = valid_conferences[0]
+ POPE.user.write
+ redirect_to(:controller=>'pentabarf')
+ end
@current_conference = Conference.new
-
end
def save_current_conference
Please sign in to comment.
Something went wrong with that request. Please try again.