residency/app/helpers/members_helper.rb
2023-01-11 20:52:58 +02:00

13 lines
249 B
Ruby

module MembersHelper
def image_for(someone , classes = "")
if someone.picture.blank?
image = asset_url("no_image")
else
image = someone.picture.url
end
image_tag(image , alt: someone.name , class: classes )
end
end