:remote =>当在表单中使用文件上传器时,true无效 [英] :remote => true not working when a file uploader is used in form
问题描述
基本上,当我在表单中包含并使用文件上传器时,它似乎取消了:remote =>真正的功能,并以HTML代替JS处理该动作.有什么想法吗?
Basically when I include and use a file uploader in my form it seems to cancel out the :remote => true functionality and processes the action as HTML in place of JS. any ideas?
推荐答案
我只是遇到了同样的问题,并且发现以下替代方法可以使它起作用:
I was just faced with the same issue and found the following alternatives to make it work:
宝石remotipart => http://www.alfajango.com/blog/rails-3-ajax-file-uploads-with-remotipart/
Gem remotipart => http://www.alfajango.com/blog/rails-3-ajax-file-uploads-with-remotipart/
jQuery插件'jaxy'=> https://github.com/adamlogic/jquery-jaxy
jQuery Plugin 'jaxy' => https://github.com/adamlogic/jquery-jaxy
我认为我更喜欢第一种选择.但是有选择是件好事. =)
I think I like the first option better. But it's good to have options. =)
这篇关于:remote =>当在表单中使用文件上传器时,true无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!