jeudi 13 août 2015

To display default user image if image is not present (ruby on rails)

I want to write a condition in ruby to display default image if no user image is present , if present display the present image.

please help.

This is my index.html.slim page:

                 `@product.reviews.each do |r|
                  a href="#"
                    = image_tag r.user.image_url :thumbnail`

Aucun commentaire:

Enregistrer un commentaire