News for hackers. Stuff that matters.
Re:A Form of Madness - Dive Into HTML5 by there on Saturday January 02, 2010 @02:46PM (#1027554)
a quick monkey patch for rails to be able to do 'f.text_field "email", :type => "email"' (though i guess f.email_field would be more appropriate but more code)

     module ActionView::Helpers
       class InstanceTag
         alias :orig_to_input_field_tag :to_input_field_tag
         def to_input_field_tag(field_type, options = {})
           orig_to_input_field_tag(options["type"] || field_type, options)
         end
       end
     end
Re:A Form of Madness - Dive Into HTML5 by stephencelis on Saturday January 02, 2010 @07:05PM (#1027894)
I've added a few HTML5 form helpers to this gem:

http://github.com/stephencelis/rerails/tree/2-3-stable

So something like this would do the trick:

   <%= f.email_field :email %>