Skip to content

Instantly share code, notes, and snippets.

@swindsor
Created July 29, 2010 20:53
Show Gist options
  • Save swindsor/499213 to your computer and use it in GitHub Desktop.
Save swindsor/499213 to your computer and use it in GitHub Desktop.
require 'active_record/connection_adapters/abstract/schema_definitions'
module ActiveRecord
module ConnectionAdapters
class Column
protected
def self.fallback_string_to_date(string)
new_date(*::Date._strptime(string, ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS[:default]).values_at(:year, :mon, :mday))
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment