Project

General

Profile

Feature #3856 » userpage-by-login.patch

Yonghwan SO, 2009-09-12 17:47

View differences:

app/controllers/account_controller.rb (작업 사본)
24 24

  
25 25
  # Show user's account
26 26
  def show
27
    @user = User.active.find(params[:id])
27
    if Integer(params[:id])
28
      @user = User.active.find(params[:id])
29
    end rescue @user = User.active.find(:all, :conditions => {:login => params[:id]})[0]
28 30
    @custom_values = @user.custom_values
29 31
    
30 32
    # show only public projects and private projects that the logged in user is also a member of
config/routes.rb (작업 사본)
16 16
  map.signin 'login', :controller => 'account', :action => 'login'
17 17
  map.signout 'logout', :controller => 'account', :action => 'logout'
18 18
  
19
  map.connect 'u/:id', :controller => 'account', :action => 'show'
19 20
  map.connect 'roles/workflow/:id/:role_id/:tracker_id', :controller => 'roles', :action => 'workflow'
20 21
  map.connect 'help/:ctrl/:page', :controller => 'help'
21 22
  
(1-1/2)