我使用“mongoid_search”在我的应用程序的索引页上进行搜索。Rails:根据url显示搜索结果
的URL,它返回的结果看起来是这样的: “?/型材UTF8 =✓& profile_search =圣+安东尼奥%2C + TX”
我将如何去获得/位置/圣安东尼奥马刺-TX返回与搜索网址相同的结果?
基本上,“位置”之后的任何内容都应该转换为“profile_search”查询字符串。
另外,是否可以保持URL相同? (例如:'/ location'san-antonio-tx“url不会改变为查询字符串)
您是否希望从[http://example.com/location/sanantonio-tx](http://example.com/location/sanantonio-tx)转到[http://example.com/profiles?utf8 =✓&profile_search =圣安东尼奥+%2C + TX](http://example.com/profiles?utf8=✓&profile_search=San+Antonio%2C+TX)?而“保持URL相同”是什么意思? – adamdunson 2013-03-01 05:09:39