Feature #3856 » user-page.patch
| app/controllers/users_controller.rb | ||
|---|---|---|
|
require_login || return
|
||
|
@user = User.current
|
||
|
else
|
||
|
@user = User.find(params[:id])
|
||
|
if Integer(params[:id])
|
||
|
@user = User.find(params[:id])
|
||
|
end rescue @user = User.where(login: params[:id]).first
|
||
|
end
|
||
|
rescue ActiveRecord::RecordNotFound
|
||
|
render_404
|
||
| config/routes.rb | ||
|---|---|---|
|
resources :memberships, :controller => 'principal_memberships'
|
||
|
resources :email_addresses, :only => [:index, :create, :update, :destroy]
|
||
|
end
|
||
|
get '/u/:id', :to => 'users#show'
|
||
|
post 'watchers/watch', :to => 'watchers#watch', :as => 'watch'
|
||
|
delete 'watchers/watch', :to => 'watchers#unwatch'
|
||
- « Previous
- 1
- 2
- Next »