0

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
Fuaad
  • 197
  • 15

1 Answers1

0

In your Property Controller

helper_method :property_thumbnail

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