Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

form_for helper don't accept 'format' option

#5226

form_for helper don't accept 'format' option

ie.

form_for Post.new, :format => :json do
  ...
end

will be like:

<form method="post" id="new_post" class="new_post" action="/posts">
  ...
</form>

but should be like:

<form method="post" id="new_post" class="new_post" action="/posts.json">
  ...
</form>

Reported by Alex Chrome · July 28th, 2010 @ 08:08 AM

State: resolved
Milestone: 3.1
Assigned to: José Valim José Valim
Importance: Low

Activity

  1. Alex Chrome
    Alex Chrome
    • Tag changed from actionpack, actionview, format, form_for to actionpack, actionview, format, form_for, patch

    Added patch

    July 28th, 2010 @ 08:17 AM

  2. Sasha Koss
    Sasha Koss

    Good idea, pretty awesome with rails 3 unobtrusive javascript

    July 28th, 2010 @ 08:21 AM

  3. Sasha Koss
    Sasha Koss

    ruby 1.9.2dev (2010-07-11 revision 28618) [x86_64-darwin10.4.0] — tests passed, tested in project, works well

    July 28th, 2010 @ 08:54 AM

  4. Damien MATHIEU
    Damien MATHIEU

    Agreed. Fantastic idea.

    July 28th, 2010 @ 08:59 AM

  5. José Valim
    José Valim
    • Importance changed from to Low

    Patch no longer applies. Could you please rebase? Thanks!

    August 2nd, 2010 @ 03:56 PM

  6. José Valim
    José Valim
    • Milestone set to 3.1

    Patch no longer applies. Could you please rebase? Thanks!

    August 2nd, 2010 @ 03:56 PM

  7. Alex Chrome
  8. Alex Chrome
  9. Repository
    Repository
    • State changed from new to resolved

    September 1st, 2010 @ 09:15 AM

  10. Repository