<%= image_tag(\"/images/users/user_\" + @user_id.to_s + \".png\") %>
How do you check to see if there is such an image, and if not, then disp
For Rails 5 the one that worked for me is
ActionController::Base.helpers.resolve_asset_path("logos/smthg.png")
returns nil if the asset is absent and path_of_the_asset if present
nil
path_of_the_asset