Skip to content

Instantly share code, notes, and snippets.

@nuxlli
Created August 17, 2008 19:42
Show Gist options
  • Save nuxlli/5818 to your computer and use it in GitHub Desktop.
Save nuxlli/5818 to your computer and use it in GitHub Desktop.
module ActionView
module Helpers
module FormHelper
def currency_field(object, method, options = {})
field = InstanceTag.new(object, method, self)
options[:value] = field.value(field.object)
options[:size] ||= 19
options[:maxlength] ||= 19
options[:style] ||= 'text-align:right'
field.to_input_field_tag("text", options)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment