Use url instead object in image_tag

Before Rails 5.2, it was possible to pass an uploader object to
`image_tag` and Rails guessed the url. With Rails 5.2 this is not
possible anymore.
This commit is contained in:
Ana María Martínez Gómez 2019-05-20 11:30:55 +02:00 committed by Henne Vogelsang
parent af1d5e4a3b
commit 085e33f495
No known key found for this signature in database
GPG key ID: 9D6164C2955FADE0
2 changed files with 2 additions and 2 deletions

BIN
app/models/.lodging.rb.swp Normal file

Binary file not shown.

View file

@ -16,9 +16,9 @@
- else
- if lodging.website_link.present?
= link_to(lodging.website_link, class: 'thumbnail') do
= image_tag lodging.picture.thumb, class: 'img-responsive img-lodging'
= image_tag lodging.picture.thumb.url, class: 'img-responsive img-lodging'
- else
= image_tag lodging.picture.thumb, class: 'img-responsive img-lodging'
= image_tag lodging.picture.thumb.url, class: 'img-responsive img-lodging'
.caption
%h3.text-center
= lodging.name