Tag: 用户名

当用户名中有@符号时,Rails,route_path会中断

每当用户名中包含@符号时,我会收到RoutingError: No route matches {:controller=>”users”, :action=>”show”, :username=>”abc@shin.com”} 我的路线看起来像这样: match ‘users/:username’ => ‘users#show’, :as => :show_other_user 我的观点是: user.username) %> 如果用户名没有@符号,一切正常。