Created
September 18, 2010 04:22
-
-
Save jasoncodes/585350 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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