This project is archived and is in readonly mode.

#5670 ✓wontfix
joost baaij

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

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

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.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Pages