I''ve done similar work in our
project<http://github.com/teambox/teambox/commit/93e80690973befb83048d3e62cbd9070bad242f4>.
What I wanted to do is enable RJS after iframe uploads, too. So I did this
hack which renders RJS as javascript string in the iframe which is
eval''d in
the scope of the main page.
I was thinking that this might be Rails core material. The iframe logic can
be handled in rails.js adapters for Prototype and jQuery, and the RJS
support can be implemented in ActionController to kick in when it detects
that the form submit is being made in an iframe (a special param can be sent
to indicate this).
Is anyone interested in this? One potential downside of async file uploads
is that there might be cross-browser issues, but on the other hand it would
enable multipart forms with files in them to support :remote => true.
@Aleksandr: I don''t see a need to change view helpers like form_for
since
all this logic and conditionals can be handled purely client-side in
rails.js. The only place in Rails which might require a change is RJS, if we
follow the hack I showed above.
On Sat, Aug 7, 2010 at 06:37, Aleksandr Koss <kossnocorp@gmail.com> wrote:
>
> But we still can''t send multipart form easy as normal via :remote
=>
> true.
>
> In my current project I write modification of jQuery UJS (http://
> gist.github.com/511578#LID34). It''s works well, but I need some
> changes in Rails.
>
> I can write gem or patch to Rails, what your think about what?
>
> btw how about automatically set :remote => true to form_for if file
> input is presented in form? I''m not sure that there is someone who
> wants to be in the form of files without multipart.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Core" group.
> To post to this group, send email to rubyonrails-core@googlegroups.com.
> To unsubscribe from this group, send email to
>
rubyonrails-core+unsubscribe@googlegroups.com<rubyonrails-core%2Bunsubscribe@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-core?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-core+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en.