Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added related events, close in time

  • Loading branch information...
commit 1dc3a1a964cd3e5d4a886eb9c18694db88be45cd 1 parent 0dc88d2
@ferblape ferblape authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  app/models/event.rb
View
2  app/models/event.rb
@@ -11,7 +11,7 @@ def similar(options = {})
:limit => 10
}
options = default_options.merge(options)
- Event.limit(options[:limit]).where("id != #{self.id}").where("events.from >= '#{(self.from + options[:distance_in_days].days).to_s(:db)}'")
+ Event.limit(options[:limit]).where("id != #{self.id}").where("events.from >= '#{(self.from.at_beginning_of_day + options[:distance_in_days].days).to_s(:db)}'")
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.