Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
This paste will be private.
Index: /Users/jgoebel/rails/raptor/vendor/rails/activesupport/lib/active_support/core_ext/time/zones.rb =================================================================== --- /Users/jgoebel/rails/raptor/vendor/rails/activesupport/lib/active_support/core_ext/time/zones.rb (revision 8714) +++ /Users/jgoebel/rails/raptor/vendor/rails/activesupport/lib/active_support/core_ext/time/zones.rb (working copy) @@ -6,11 +6,19 @@ def self.included(base) #:nodoc: base.extend(ClassMethods) if base == ::Time # i.e., don't include class methods in DateTime + base.class_eval do + alias_method :minus_without_timezone, :- + alias_method :-, :minus_with_timezone + end end module ClassMethods attr_reader :zone + def minus_with_timezone(time) + ??? + end + # Sets a global default time zone, separate from the system time zone in ENV['TZ']. # Accepts either a Rails TimeZone object, a string that identifies a # Rails TimeZone object (e.g., "Central Time (US & Canada)"), or a TZInfo::Timezone object
From the Design Piracy series on my blog: