레일 3 질문이 있습니다. 내 사용자의 컨트롤러 쇼 페이지에 app.com/people/username URL이 있어야합니다. 경로라우팅 오류 : username in url
resources :users
match "/people/:username" => 'users#show', :as => :profile
사용자 이름이로 시작하면 그것은 작동하지만
"." (점) 나는 오류가 있습니다
어떤 경로 "/people/.G"를 일치하지
그리고
<%= link_to current_user.username, profile_path(current_user.username) %>
예외 제기 :
없음 경로 일치 {: 컨트롤러 => "users", : action => "show", : username => ". G"}
내 영어로 죄송합니다. 에스!
여기에 link_to 경로로 무엇을 사용하고 있습니까? 어떻게 "username"매개 변수를 포맷합니까? – goddamnyouryan