Description:
git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@244 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r118:fc6cd4c8e4bf - - 3 files changed: 5 inserted, 3 deleted

@@ -1,24 +1,26
1 1 class UsersController < ApplicationController
2 2
3 3 before_filter :authenticate
4 4
5 5 verify :method => :post, :only => [:chg_passwd],
6 6 :redirect_to => { :action => :index }
7 7
8 8 in_place_edit_for :user, :alias_for_editing
9 9 in_place_edit_for :user, :email_for_editing
10 10
11 11 def index
12 - @user = User.find(session[:user_id])
12 + # ... disable in this contest ...
13 + # @user = User.find(session[:user_id])
14 + redirect_to :controller => 'main', :action => 'list'
13 15 end
14 16
15 17 def chg_passwd
16 18 user = User.find(session[:user_id])
17 19 user.password = params[:passwd]
18 20 user.password_confirmation = params[:passwd_verify]
19 21 if user.save
20 22 flash[:notice] = 'password changed'
21 23 else
22 24 flash[:notice] = 'Error: password changing failed'
23 25 end
24 26 redirect_to :action => 'index'
@@ -1,19 +1,19
1 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 3
4 4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5 5 <head>
6 6 <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
7 - <title>Grader!</title>
7 + <title>APIO'08</title>
8 8 <%= stylesheet_link_tag 'application' %>
9 9 <%= yield :head %>
10 10 </head>
11 11 <body>
12 12
13 13 <div class="userbar">
14 14 <%= user_header %>
15 15 </div>
16 16
17 17 <%= content_tag(:p,flash[:notice],:style => "color:green") if flash[:notice]!=nil %>
18 18
19 19 <%= yield %>
@@ -1,15 +1,15
1 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 3
4 4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5 5 <head>
6 6 <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
7 - <title>Grader!</title>
7 + <title>APIO'08</title>
8 8 <%= stylesheet_link_tag 'application' %>
9 9 </head>
10 10 <body>
11 11
12 12 <%= yield %>
13 13
14 14 </body>
15 15 </html>
You need to be logged in to leave comments. Login now