Skip to content

Commit

Permalink
Merge pull request #558 from tnir/tn-fix-filename-for-thumbnails
Browse files Browse the repository at this point in the history
fix: fix wrong template structure for /design in /thumbnails
  • Loading branch information
tombruijn authored Nov 6, 2023
2 parents 15fc2f8 + d074b80 commit 5a28d2b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions _pages/thumbnails.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,16 @@ The images uploaded from now on will be resized to a smaller size, but the ones

We haven't changed how the idea pictures are displayed, so it should still be showing the original larger image. Let's change the views to display the thumbnail instead.

Open `app/views/ideas/index.html.erb` and change the line:
Open `app/views/ideas/_idea.html.erb` and change the line:

{% highlight erb %}
<%= image_tag(@idea.picture_url, width: 150, height: 150, class: "img-thumbnail flex-shrink-0") if @idea.picture? %>
<%= image_tag(idea.picture_url, width: 150, height: 150, class: "img-thumbnail flex-shrink-0") if idea.picture? %>
{% endhighlight %}

to this line:

{% highlight erb %}
<%= image_tag(@idea.picture_url(:thumb), width: 150, height: 150, class: "img-thumbnail flex-shrink-0") if @idea.picture? %>
<%= image_tag(idea.picture_url(:thumb), width: 150, height: 150, class: "img-thumbnail flex-shrink-0") if idea.picture? %>
{% endhighlight %}

Take a look at the [list of ideas](http://localhost:3000/ideas) in the Browser to see if your ideas now have a thumbnail.
Expand Down

0 comments on commit 5a28d2b

Please sign in to comment.