Skip to content
Permalink
Browse files

filter out santa beard selfie

  • Loading branch information...
pugetive committed Mar 28, 2019
1 parent c38aac3 commit 514281017cb1c8e6c192aaa1c605262e279f2af1
Showing with 4 additions and 1 deletion.
  1. +4 −1 app/models/works/photo.rb
@@ -15,7 +15,10 @@ class Photo < Work


def self.todays_sample_photo
photos = self.joins(:series_works).uniq.sort_by{|photo| Digest::SHA1.hexdigest(photo.id.to_s)}
photos = self.joins(:series_works)
.where("works.id != 237") # Santa beard selfie, no thanks
.uniq
.sort_by{|photo| Digest::SHA1.hexdigest(photo.id.to_s)}
days_since_epoch = Date.today.to_time.to_i / (60 * 60 * 24)
freshness_offset = photos.select{|p| p.created_at.to_date > Date.new(2019, 1, 13)}.count

0 comments on commit 5142810

Please sign in to comment.
You can’t perform that action at this time.