samedi 18 juin 2022

How to fix error in rails 7 action view helper?

I'm getting this error ("wrong number of arguments (given 1, expected 0)") in the following helper.

module PropertiesHelper
        def property_thumbnail
          img = property.photo.present? ? property.photo.thumb.url : "placeholder.png"
          image_tag img, class: "property_thumb"
        end
end

Aucun commentaire:

Enregistrer un commentaire