|  |  | @ -17,7 +17,7 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | class WelcomeController < ApplicationController |  |  |  | class WelcomeController < ApplicationController | 
			
		
	
		
		
			
				
					
					|  |  |  |   caches_action :robots |  |  |  |   caches_action :robots | 
			
		
	
		
		
			
				
					
					|  |  |  |   before_filter :entry_select, :entry_select_contest, :only => [:index] |  |  |  |   before_filter :entry_select_course, :entry_select_contest, :only => [:index] | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |   |  |  |  |   | 
			
		
	
		
		
			
				
					
					|  |  |  |   def index |  |  |  |   def index | 
			
		
	
		
		
			
				
					
					|  |  |  |     # @news = News.latest User.current |  |  |  |     # @news = News.latest User.current | 
			
		
	
	
		
		
			
				
					|  |  | @ -113,13 +113,13 @@ class WelcomeController < ApplicationController | 
			
		
	
		
		
			
				
					
					|  |  |  |   private |  |  |  |   private | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   # 判断网站的入口,是课程 course 则跳过index去渲染 course 方法 |  |  |  |   # 判断网站的入口,是课程 course 则跳过index去渲染 course 方法 | 
			
		
	
		
		
			
				
					
					|  |  |  |   def entry_select |  |  |  |   def entry_select_course | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     (course() and render :course and return 0) if request.original_url.match(/course\.trustie\.net/) |  |  |  |     (course() and render :course and return 0) if request.original_url.match(/course\.trustie\.net/) | 
			
		
	
		
		
			
				
					
					|  |  |  |   end |  |  |  |   end | 
			
		
	
		
		
			
				
					
					|  |  |  |    |  |  |  |    | 
			
		
	
		
		
			
				
					
					|  |  |  |   def entry_select_contest |  |  |  |   def entry_select_contest | 
			
		
	
		
		
			
				
					
					|  |  |  |     if request.original_url.match(/contest\.trustie\.net/) |  |  |  |     if request.original_url.match(/contest\.trustie\.net/) | 
			
		
	
		
		
			
				
					
					|  |  |  |       course |  |  |  |       contest | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       render :contest, layout: false |  |  |  |       render :contest, layout: false | 
			
		
	
		
		
			
				
					
					|  |  |  |       return 0 |  |  |  |       return 0 | 
			
		
	
		
		
			
				
					
					|  |  |  |     end |  |  |  |     end | 
			
		
	
	
		
		
			
				
					|  |  | 
 |