Description:
fix some layout problem: first time at main after login, using wrong layouts
git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@39 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r15:ef7a1ef3afd0 - - 1 file changed: 2 inserted, 0 deleted
@@ -1,19 +1,21 | |||||
|
1 | class MainController < ApplicationController |
|
1 | class MainController < ApplicationController |
|
2 |
|
2 | ||
|
3 | before_filter :authenticate, :except => [:index, :login] |
|
3 | before_filter :authenticate, :except => [:index, :login] |
|
4 |
|
4 | ||
|
5 | verify :method => :post, :only => [:submit], |
|
5 | verify :method => :post, :only => [:submit], |
|
6 | :redirect_to => { :action => :index } |
|
6 | :redirect_to => { :action => :index } |
|
7 |
|
7 | ||
|
|
8 | + layout 'application' | ||
|
|
9 | + | ||
|
8 | def index |
|
10 | def index |
|
9 | redirect_to :action => 'login' |
|
11 | redirect_to :action => 'login' |
|
10 | end |
|
12 | end |
|
11 |
|
13 | ||
|
12 | def login |
|
14 | def login |
|
13 | MainController.layout 'login' |
|
15 | MainController.layout 'login' |
|
14 | reset_session |
|
16 | reset_session |
|
15 | end |
|
17 | end |
|
16 |
|
18 | ||
|
17 | def list |
|
19 | def list |
|
18 | @problems = Problem.find_available_problems |
|
20 | @problems = Problem.find_available_problems |
|
19 | @prob_submissions = Array.new |
|
21 | @prob_submissions = Array.new |
You need to be logged in to leave comments.
Login now