Skip to content

Commit

Permalink
Show all pictures from a folder
Browse files Browse the repository at this point in the history
  • Loading branch information
luontola committed Feb 23, 2018
1 parent 0d5309e commit 0868fa9
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions app.rb
Expand Up @@ -8,17 +8,6 @@
end

get '/pictures.html' do
@picture_urls = [
"http://www.publicdomainpictures.net/pictures/50000/t2/cat-looking-up.jpg",
"http://www.publicdomainpictures.net/pictures/30000/t2/cat-in-the-city-5.jpg",
"http://www.publicdomainpictures.net/pictures/30000/t2/annoyed-cat.jpg",
"http://www.publicdomainpictures.net/pictures/30000/t2/cat-in-the-city-2.jpg",
"http://www.publicdomainpictures.net/pictures/50000/t2/cat-in-chair.jpg",
"http://www.publicdomainpictures.net/pictures/30000/t2/cat-hunting.jpg",
"http://www.publicdomainpictures.net/pictures/10000/t2/lieblingskater-44421287869401VYcy.jpg",
"http://www.publicdomainpictures.net/pictures/60000/t2/cat-1382017414PaD.jpg",
"http://www.publicdomainpictures.net/pictures/50000/t2/cat-1373445873hvw.jpg",
"http://www.publicdomainpictures.net/pictures/40000/t2/cross-eyed-cat.jpg",
]
@picture_urls = Dir.glob('public/pictures/**').map { |path| path.sub('public', '') }
erb :pictures
end
Binary file added public/pictures/annoyed-cat.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/pictures/cat-1373445873hvw.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/pictures/cat-1382017414PaD.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/pictures/cat-hunting.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0868fa9

Please sign in to comment.