Skip to content
Browse files

add gmtime for DateTime

  • Loading branch information...
1 parent af2432f commit 4fc35f731fbfa870751982e742d6011fd8ba1a98 @shenoudab shenoudab committed Jan 8, 2011
Showing with 9 additions and 0 deletions.
  1. +1 −0 lib/devise/orm/couchrest_model.rb
  2. +8 −0 lib/devise/orm/couchrest_model/date_time.rb
View
1 lib/devise/orm/couchrest_model.rb
@@ -1,5 +1,6 @@
require 'devise_couch'
require 'devise/orm/couchrest_model/schema'
+require 'devise/orm/couchrest_model/date_time'
require 'orm_adapter/adapters/couchrest_model'
module Devise
View
8 lib/devise/orm/couchrest_model/date_time.rb
@@ -0,0 +1,8 @@
+# Add DateTime#gmtime method if needed.
+class DateTime
+ unless method_defined?(:gmtime)
+ def gmtime
+ self.new_offset(0)
+ end
+ end
+end

0 comments on commit 4fc35f7

Please sign in to comment.
Something went wrong with that request. Please try again.