form_remote_tag does not support the input type=file. This is due to javascript security limitations. I created a plugin that modifies form_remote_tag so that if you pass it the option: :html => {:multipart => true}, it will submit via an iframe, allowing you to upload files. It works nicely with file_column :). Currently, it only works with RJS templates (no :update option), and I only implemented the :loading callback. Patches are welcome to flesh out the functionality, but I''m sharing it now because it''s still quite useful. http://svn.kylemaxwell.com/form_remote_upload/trunk Patches, bugs, etc via email or at dev.kylemaxwell.com -- Kyle Maxwell Chief Technologist E Factor Media // FN Interactive kyle@efactormedia.com 1-866-263-3261
I just wanted to note that the form_remote_upload works for Rails 1.0, with the RJS plugin. To get it working with Edge Rails, please replace JavascriptHelper with PrototypeHelper on lib/frt_upload_helper.rb#3 -- Kyle Maxwell Chief Technologist E Factor Media // FN Interactive kyle@efactormedia.com 1-866-263-3261
The uploading feature works great, just one problem -- Everything defined in my ApplicationHelper suddenly stops working, ie: undefined method `thumbnail_default'' for #<#<Class:0x220c210>:0x220c1ac> (thumbnail_default is defiend in ApplicationHelper) I figured something must be wrong with frt_upload_filter.rb so I commented it all out, restarted the server, and my helpers started to work again. Any ideas on this one? -- Posted via http://www.ruby-forum.com/.
On 2/14/06, adam roth <adamjroth@gmail.com> wrote:> The uploading feature works great, just one problem -- Everything > defined in my ApplicationHelper suddenly stops working, ie: > > undefined method `thumbnail_default'' for #<#<Class:0x220c210>:0x220c1ac> > > (thumbnail_default is defiend in ApplicationHelper) > > I figured something must be wrong with frt_upload_filter.rb so I > commented it all out, restarted the server, and my helpers started to > work again. Any ideas on this one? > > > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >Try to break down which lines are causing the problem. It''s probably one of the includes in ActionController::Base around frt_upload_filter#20. -- Kyle Maxwell Chief Technologist E Factor Media // FN Interactive kyle@efactormedia.com 1-866-263-3261
Iam having the same exact problem. I tried including the after_filter directly into the Base controller, but my helpers are still not visible. Anybody else get their helpers working after installing this plugin, please chime in. Appreciate your help. On 2/15/06, Kyle Maxwell <kyle@kylemaxwell.com> wrote:> > On 2/14/06, adam roth <adamjroth@gmail.com> wrote: > > The uploading feature works great, just one problem -- Everything > > defined in my ApplicationHelper suddenly stops working, ie: > > > > undefined method `thumbnail_default'' for #<#<Class:0x220c210>:0x220c1ac> > > > > (thumbnail_default is defiend in ApplicationHelper) > > > > I figured something must be wrong with frt_upload_filter.rb so I > > commented it all out, restarted the server, and my helpers started to > > work again. Any ideas on this one? > > > > > > > > > > -- > > Posted via http://www.ruby-forum.com/. > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > Try to break down which lines are causing the problem. It''s probably > one of the includes in ActionController::Base around > frt_upload_filter#20. > > -- > Kyle Maxwell > Chief Technologist > E Factor Media // FN Interactive > kyle@efactormedia.com > 1-866-263-3261 > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060322/a470d812/attachment-0001.html
As far as I remember, I justI included the after filter directly in the application controler and then the the helpers were available again. The other issue I had, is that the upload remote-form-tag has not all the options and calllbacks of the normal remote-form-tag On 3/22/06, Sunder Iyer <sunderlist@gmail.com> wrote:> > Iam having the same exact problem. I tried including the after_filter > directly into the Base controller, but my helpers are still not visible. > Anybody else get their helpers working after installing this plugin, please > chime in. Appreciate your help. > > > > On 2/15/06, Kyle Maxwell <kyle@kylemaxwell.com> wrote: > > > On 2/14/06, adam roth <adamjroth@gmail.com> wrote: > > The uploading feature works great, just one problem -- Everything > > defined in my ApplicationHelper suddenly stops working, ie: > > > > undefined method `thumbnail_default'' for #<#<Class:0x220c210>:0x220c1ac> > > > > (thumbnail_default is defiend in ApplicationHelper) > > > > I figured something must be wrong with frt_upload_filter.rb so I > > commented it all out, restarted the server, and my helpers started to > > work again. Any ideas on this one? > > > > > > > > > > -- > > Posted via http://www.ruby-forum.com/. > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > Try to break down which lines are causing the problem. It''s probably > one of the includes in ActionController::Base around > frt_upload_filter#20. > > -- > Kyle Maxwell > Chief Technologist > E Factor Media // FN Interactive > kyle@efactormedia.com > 1-866-263-3261 > > _______________________________________________ > > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- Roberto Saccon - http://rsaccon.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060323/40094159/attachment-0001.html
I added all the helpers to application.rb, as: helper :application, :products, :line_items Then it works fine. --TJ adam roth wrote:> The uploading feature works great, just one problem -- Everything > defined in my ApplicationHelper suddenly stops working, ie: > > undefined method `thumbnail_default'' for #<#<Class:0x220c210>:0x220c1ac> > > (thumbnail_default is defiend in ApplicationHelper) > > I figured something must be wrong with frt_upload_filter.rb so I > commented it all out, restarted the server, and my helpers started to > work again. Any ideas on this one?-- Posted via http://www.ruby-forum.com/.
> upload remote-form-tag has not all the > options and calllbacks of the normal remote-form-tagI implemented the bare minimum of the :loading => "" parameter, plus RJS template responses. You should be able to get any behavior you want out of this combination, although perhaps not in the way you are used to doing. -Kyle