我使用「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