On Tue, Jan 5, 2010 at 12:26 PM, Mislav Marohnić <mislav.maroh...@gmail.com> wrote: > On Mon, Jan 4, 2010 at 15:31, Stephen Celis <stephen.ce...@gmail.com> wrote: >> >> Some may feel that something like "text_field_tag 'email', nil, :type >> => 'email'" is good enough, but this doesn't work for "text_field" >> because any "type" option is overridden to "text" (this could be fixed >> with a smaller patch). > > I suggest making this smaller patch, since it fixes a bug that prevents > people from specifying arbitrary types for form inputs. Next, I would make a > patch that adds method_missing to form builder and allows things like > `anything_field`, which creates an input with type="anything". This is might > be a good future-proof solution until the HTML5 spec is finalized—what do > the others think?
If in the future there's a new input type people using old versions could define their own helper as a last resort. I don't think this use case deserves a solution with method_missing. Prefer explicit methods here. I mean, if we expected dozens of new input types it could be worth it perhaps, but... -- 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-c...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.