module MessagesHelper
def recipients_options s = '' users = User.all + BizUser.all; users.each do |user| s << "<option value='#{user.id}' data-img-src='#{attachment_url(@user, user.email, :profile_avatar, :fill, 50, 50)}'>#{user.username}</option>" end s.html_safe end end
How would I pass if nil to the attachment_url for user :profile_avatar? when the image isn't available.