volunteers/app/helpers/members_helper.rb

13 lines
249 B
Ruby
Raw Normal View History

2022-12-20 16:05:26 +01:00
module MembersHelper
2023-01-11 17:20:21 +01:00
def image_for(someone , classes = "")
if someone.picture.blank?
image = asset_url("no_image")
else
2023-01-11 19:52:58 +01:00
image = someone.picture.url
2023-01-11 17:20:21 +01:00
end
image_tag(image , alt: someone.name , class: classes )
end
2022-12-20 16:05:26 +01:00
end