<%= 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
You can use File.file? method.
if File.file?("#{Rails.root}/app/assets/images/{image_name}") image_tag("#{image_name}") end
You can also use File.exist? method but it will return true if it finds a directory or a file. The method file? is slightly more picky than exist?