I have a link_to Rails helper that downloads a wallpaper when clicked. But the image is loading in the browser instead of being downloaded immediately.
<%
There is an easier way to do this with the HTML5 download attribute.
<%= link_to 'Download existing avatar', @user.avatar(:original), download: "User_#{@user.id}_avatar" %>