【发布时间】:2016-04-23 14:20:35
【问题描述】:
在我的路线配置中,我有:
constraints subdomain: 'api' do
scope module: 'api' do
namespace :v1 do
get '/me', to: 'users#me'
end
end
end
bin/rake 路由返回
v1_me GET /v1/me(.:format) api/v1/users#me {:subdomain=>"api"}
当我尝试使用邮递员使用 uri http://localhost:3000/v1/me、http://localhost:3000/api/v1/me 或 http://localhost:3000/me 时,出现 404 not found 错误。
ActionController::RoutingError (No route matches [GET] "/v1/me"):
我的代码有什么问题?
【问题讨论】:
标签: ruby-on-rails ruby