通过get in rails传递参数数组 [英] Passing array of parameters through get in rails
本文介绍了通过get in rails传递参数数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何通过rails中的Get方法传递参数数组?目前我的网址如下:
How do I pass array of parameters through Get method in rails? Currently my URL loocs like this:
http://localhost:3000/jobs/1017/editing_job_suites/1017/editing_member_jobs/new?ids[]=1025&ids[]=1027
如何使用Get方法传递数组但要避免?ids [] = 1025& ids [] = 1027
part。
How can I pass the array with Get method but avoid ?ids[]=1025&ids[]=1027
part.
使用javascript发送请求window.open方法。是否有任何解决方法来发送不是ajax Post请求。
Request is being sent with javascript window.open method. Is there any workaround to send not ajax Post request.
推荐答案
不,GET只能在网址上放置变量。如果您希望URL更短,则必须POST。这是HTTP的限制功能,而不是Rails。
No, GET can only put variables on the url itself. If you want the URL to be shorter, you have to POST. That's a limitation feature of HTTP, not Rails.
这篇关于通过get in rails传递参数数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文