Skip to content
Browse files

Fix visited_on to be a regular DateTime

  • Loading branch information...
1 parent df24e59 commit ac2e814e6257217724397994d53ea142a7f7de87 @topfunky committed Aug 6, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/models/note.rb
View
4 app/models/note.rb
@@ -5,7 +5,7 @@ class Note < CouchRest::ExtendedDocument
property :title
property :description
property :tags, :default => []
- property :visited_on, :default => lambda { Time.now.strftime('%Y/%m/%d') }
+ property :visited_on, :default => lambda { Time.now }
timestamps!
@@ -85,7 +85,7 @@ def tags_string
:map =>
"function(doc) {
if (doc['couchrest-type'] == 'Note' && doc.visited_on) {
- emit(Util.dateAsArray(doc.visited_on), doc);
+ emit(Date.parse(doc.visited_on.data), doc);
}
}"
}

0 comments on commit ac2e814

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