app/models/whoops/event.rb in whoops-0.5.0 vs app/models/whoops/event.rb in whoops-0.5.1

- old
+ new

@@ -11,11 +11,11 @@ index([[:event_group_id,Mongo::ASCENDING],[:event_time, Mongo::DESCENDING]]) validates_presence_of :message - before_save :set_keywords, :sanitize_details + before_save :set_keywords, :sanitize_details, :set_event_time def self.search(query) conditions = Whoops::MongoidSearchParser.new(query).conditions where(conditions) end @@ -74,7 +74,11 @@ flattened.collect! do |i| i.to_a.flatten - i.keys end.flatten! end + end + + def set_event_time + self.event_time = Time.now end end