Guest User

Untitled

a guest
Feb 21st, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. diff --git a/app/models/event.rb b/app/models/event.rb
  2. index d8172e2..bbe8053 100644
  3. --- a/app/models/event.rb
  4. +++ b/app/models/event.rb
  5. @@ -714,8 +714,8 @@ class Event < ActiveRecord::Base
  6. score = 0
  7.  
  8. ## TODO: should datetimes that are further apart add more to the distance? spiros says yes
  9. - score += 25 if starts_at != other_event.starts_at
  10. - score += 5 if ends_at != other_event.ends_at
  11. + score += 25 if starts_at.as_utc != other_event.starts_at.as_utc
  12. + score += 5 if ends_at.as_utc != other_event.ends_at.as_utc
  13. score += 5 if location != other_event.location
  14.  
  15. ## I used to ignore changes to the summary since the harvester might change it, but with ical obviously i have to consider it
Add Comment
Please, Sign In to add comment