Skip to content

Instantly share code, notes, and snippets.

@shtirlic
Created May 24, 2011 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shtirlic/988848 to your computer and use it in GitHub Desktop.
Save shtirlic/988848 to your computer and use it in GitHub Desktop.
Add milliseconds (by default) for to_xml method on date fields
class ActiveSupport::TimeWithZone
alias_method :original_xmlschema , :xmlschema
def xmlschema(fraction_digits = 3)
original_xmlschema(fraction_digits)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment