简体   繁体   English

具有漂亮网址的Ruby on Rails auto_complete插件

[英]Ruby on Rails auto_complete plugin with pretty urls

I am using the Rails auto_complete plugin: https://github.com/rails/auto_complete 我正在使用Rails auto_complete插件: https : //github.com/rails/auto_complete

problem is when i submit a GET form containing this line 问题是当我提交包含此行的GET表单时

<%= text_field_with_auto_complete :post, title %>

the value of the text field gets wrapped in a :post in the url 文本字段的值被包装在url中的:post中

http://myapp.com/posts?post%5Btitle%5D=help

I would much prefer 我更喜欢

http://myapp.com/post?title=help

How can i achieve this please? 我怎样才能做到这一点?

还没有尝试过该插件,但是我认为<%= text_field_with_auto_complete:post,title,{:name =>'title'}%>应该可以工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM