Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是我的路线:
resources :users
是否可以获取带有参数但没有价值的路线,例如:
/users/123?cool
或者
/users/123?bad
我应该如何调用路由UrlHelper来获得这个结果?
UrlHelper
您可以在使用以下方法调用路由时添加任何自定义参数UrlHelper:
users_path(cool: true)
将产生以下路径:
/users?cool=true