:remote =>当在表单中使用文件上传器时,true无效 [英] :remote => true not working when a file uploader is used in form

查看:90
本文介绍了:remote =>当在表单中使用文件上传器时,true无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基本上,当我在表单中包含并使用文件上传器时,它似乎取消了: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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆