Skip to content

Instantly share code, notes, and snippets.

@jasoncodes
Created September 18, 2010 04:22
Show Gist options
  • Save jasoncodes/585350 to your computer and use it in GitHub Desktop.
Save jasoncodes/585350 to your computer and use it in GitHub Desktop.
module ActionView::Helpers::FormTagHelper
def date_field(object_name, method, options = {})
ActionView::Helpers::InstanceTag.new(object_name, method, self, options.delete(:object)).to_input_field_tag("date", options.merge(:size => nil))
end
end
class ActionView::Helpers::FormBuilder
def date_field(method, options = {})
@template.send(
"date_field",
@object_name,
method,
objectify_options(options))
end
end
class Formtastic::SemanticFormBuilder
def date_input(method, options)
basic_input_helper(:date_field, :string, method, options)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment