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:
parent
af1d5e4a3b
commit
085e33f495
2 changed files with 2 additions and 2 deletions
BIN
app/models/.lodging.rb.swp
Normal file
BIN
app/models/.lodging.rb.swp
Normal file
Binary file not shown.
|
|
@ -16,9 +16,9 @@
|
||||||
- else
|
- else
|
||||||
- if lodging.website_link.present?
|
- if lodging.website_link.present?
|
||||||
= link_to(lodging.website_link, class: 'thumbnail') do
|
= 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
|
- else
|
||||||
= image_tag lodging.picture.thumb, class: 'img-responsive img-lodging'
|
= image_tag lodging.picture.thumb.url, class: 'img-responsive img-lodging'
|
||||||
.caption
|
.caption
|
||||||
%h3.text-center
|
%h3.text-center
|
||||||
= lodging.name
|
= lodging.name
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue