Skip to content

Commit

Permalink
#48 사용자 프로필 URL 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
ChangJoo-Park committed Apr 25, 2018
1 parent 45ee48d commit 42ae68a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class UsersController < ApplicationController
def show
puts "SHOW"
@user = User.find_by username: params['id']
@user = User.find_by username: params['username']
puts @user
end
end
4 changes: 3 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
Rails.application.routes.draw do
resources :users, only: [:show] do

get '/:username', to: 'users#show', as: 'users' do
resources :items
end

devise_for :users
get 'static_pages/home'
get 'static_pages/help'
Expand Down

0 comments on commit 42ae68a

Please sign in to comment.