Project

General

Profile

Feature #3856 » user-page.patch

Yonghwan SO, 2016-04-07 17:50

View differences:

app/controllers/users_controller.rb
182 182
      require_login || return
183 183
      @user = User.current
184 184
    else
185
      @user = User.find(params[:id])
185
      if Integer(params[:id])
186
        @user = User.find(params[:id])
187
      end rescue @user = User.where(login: params[:id]).first
186 188
    end
187 189
  rescue ActiveRecord::RecordNotFound
188 190
    render_404
config/routes.rb
88 88
    resources :memberships, :controller => 'principal_memberships'
89 89
    resources :email_addresses, :only => [:index, :create, :update, :destroy]
90 90
  end
91
  get '/u/:id', :to => 'users#show'
91 92

  
92 93
  post 'watchers/watch', :to => 'watchers#watch', :as => 'watch'
93 94
  delete 'watchers/watch', :to => 'watchers#unwatch'
(2-2/2)