Skip to content

Commit

Permalink
fix: Change dummy photo service from unsplash to picsum (#2926)
Browse files Browse the repository at this point in the history
  • Loading branch information
julianrubisch authored Jul 1, 2024
1 parent 6e798f4 commit 6d7a456
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/dummy/db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@
begin
width = [1000, 1100, 1200, 1300].sample
height = [1000, 1100, 1200, 1300].sample
url = "https://source.unsplash.com/random/#{width}x#{height}/?all"
url = "https://picsum.photos/#{width}/#{height}"
io = URI.open(url) # standard:disable Security/Open
rescue
puts "Failed to fetch cover photo from Unsplash"
puts "Failed to fetch cover photo from Picsum"
end
post.cover_photo.attach(io: io, filename: "cover.jpg") if io

Expand Down

0 comments on commit 6d7a456

Please sign in to comment.