Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add gmtime for DateTime

  • Loading branch information...
commit 4fc35f731fbfa870751982e742d6011fd8ba1a98 1 parent af2432f
@shenoudab shenoudab authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.