Description:
fixed layout bugs again -- added explicit layout in main_controller
git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@50 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
r26:a3328dc4a80b - - 1 file changed: 2 inserted, 0 deleted
@@ -1,28 +1,30 | |||
|
1 | 1 | class MainController < ApplicationController |
|
2 | 2 | |
|
3 | 3 | before_filter :authenticate, :except => [:index, :login] |
|
4 | 4 | |
|
5 | + layout 'application' | |
|
6 | + | |
|
5 | 7 | verify :method => :post, :only => [:submit], |
|
6 | 8 | :redirect_to => { :action => :index } |
|
7 | 9 | |
|
8 | 10 | |
|
9 | 11 | def index |
|
10 | 12 | redirect_to :action => 'login' |
|
11 | 13 | end |
|
12 | 14 | |
|
13 | 15 | def login |
|
14 | 16 | MainController.layout 'empty' |
|
15 | 17 | reset_session |
|
16 | 18 | end |
|
17 | 19 | |
|
18 | 20 | def list |
|
19 | 21 | @problems = Problem.find_available_problems |
|
20 | 22 | @prob_submissions = Array.new |
|
21 | 23 | @user = User.find(session[:user_id]) |
|
22 | 24 | @problems.each do |p| |
|
23 | 25 | c, sub = Submission.find_by_user_and_problem(@user.id,p.id) |
|
24 | 26 | @prob_submissions << [c,sub] |
|
25 | 27 | end |
|
26 | 28 | end |
|
27 | 29 | |
|
28 | 30 | def submit |
You need to be logged in to leave comments.
Login now