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.

[PATCH] file_field_tag makes the enclosing form multipart (see b17b980).

#5670

A great feature was added in b17b980a15ee4a5f2f629d91c6fa6ca7db74daa8 which sets form_for to multipart automatically. This patch adds that feature to form_tag as well.

This is a first implementation using String#include? to check the captured block.

Consider this ugly, but a good working implementation. A better approach would probably be an inner class to build the form, but that's quite an undertaking and I wanted to float the idea here first.

Reported by joost baaij · September 20th, 2010 @ 02:44 PM

State: wontfix
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. David Trasbo
    David Trasbo
    • State changed from new to wontfix
    • Assigned user cleared.
    • Importance changed from to Low

    I agree completely with José Valim: "This behavior should not be added form_tag. form_tag is a basic/raw constructor."

    September 21st, 2010 @ 01:52 PM

  2. joost baaij