开发者

Ruby on Rails auto_complete plugin with pretty urls

开发者 https://www.devze.com 2023-01-26 06:09 出处:网络
I am using the Rails auto_complete plugin: https://g开发者_运维问答ithub.com/rails/auto_complete

I am using the Rails auto_complete plugin: https://g开发者_运维问答ithub.com/rails/auto_complete

problem is when i submit a GET form containing this line

<%= text_field_with_auto_complete :post, title %>

the value of the text field gets wrapped in a :post in the url

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

I would much prefer

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

How can i achieve this please?


Haven't tried that plugin, but I think <%= text_field_with_auto_complete :post, title, {:name=>'title'} %> should work

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号