Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

form multipart not working #10176

Closed
davidhq opened this issue Apr 11, 2013 · 8 comments
Closed

form multipart not working #10176

davidhq opened this issue Apr 11, 2013 · 8 comments

Comments

@davidhq
Copy link

davidhq commented Apr 11, 2013

Hi,

I have this code:

= form_for @spot, :html => { :id => 'spot_form', :name => 'spot_form', :multipart => true } do |form|

but the output in html looks like this:

<form accept-charset="UTF-8" action="/spots" class="new_spot" id="spot_form" method="post" name="spot_form">

If I include file field on the form, then it will be multipart but I need to set it as multipart even without the file field directly on the "form object".

This used to work...
maybe I'm missing something?

thank you!
david

@rafaelfranca
Copy link
Member

which Rails version are you using?

@carlosantoniodasilva
Copy link
Member

I think that the multipart option should be outside the html hash: form_for @spot, multipart: true, html: {}...

Please use mailing lists, irc or stack overflow for questions, we try to keep the issues list for issues :). Thanks!

@rafaelfranca
Copy link
Member

The use is correct and it was broken on Rails 4.0.0.beta1. It is fixed on master right now. I just want to make sure which version he is using

@carlosantoniodasilva
Copy link
Member

Ok, now I remember there was a fix after the beta was released. 👍

On Thu, Apr 11, 2013 at 11:39 AM, Rafael Mendonça França <
notifications@github.com> wrote:

The use is correct and it was broken on Rails 4.0.0.beta1. It is fixed on
master right now. I just want to make sure which version he is using


Reply to this email directly or view it on GitHubhttps://github.com//issues/10176#issuecomment-16238524
.

At.
Carlos Antonio

@davidhq
Copy link
Author

davidhq commented Apr 11, 2013

4.0.0.beta1 :)

Should I just use Master?

On Thu, Apr 11, 2013 at 4:37 PM, Rafael Mendonça França <
notifications@github.com> wrote:

which Rails version are you using?


Reply to this email directly or view it on GitHubhttps://github.com//issues/10176#issuecomment-16238314
.

@carlosantoniodasilva
Copy link
Member

If you can try, that'd be super awesome :)

On Thu, Apr 11, 2013 at 11:49 AM, David Krmpotic
notifications@github.comwrote:

4.0.0.beta1 :)

Should I just use Master?

On Thu, Apr 11, 2013 at 4:37 PM, Rafael Mendonça França <
notifications@github.com> wrote:

which Rails version are you using?


Reply to this email directly or view it on GitHub<
https://github.com/rails/rails/issues/10176#issuecomment-16238314>
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/10176#issuecomment-16239214
.

At.
Carlos Antonio

@rafaelfranca
Copy link
Member

Yes, please. master will be Rails 4 soon, so your application should not break using it.

Closing this one. Thank you for reporting

@davidhq
Copy link
Author

davidhq commented Apr 11, 2013

I tried it on master and it is indeed fixed…

thank you!
david

On Thu, Apr 11, 2013 at 4:52 PM, Carlos Antonio da Silva <
notifications@github.com> wrote:

If you can try, that'd be super awesome :)

On Thu, Apr 11, 2013 at 11:49 AM, David Krmpotic
notifications@github.comwrote:

4.0.0.beta1 :)

Should I just use Master?

On Thu, Apr 11, 2013 at 4:37 PM, Rafael Mendonça França <
notifications@github.com> wrote:

which Rails version are you using?


Reply to this email directly or view it on GitHub<
https://github.com/rails/rails/issues/10176#issuecomment-16238314>
.


Reply to this email directly or view it on GitHub<
https://github.com/rails/rails/issues/10176#issuecomment-16239214>
.

At.
Carlos Antonio

Reply to this email directly or view it on GitHubhttps://github.com//issues/10176#issuecomment-16239370
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants