Rails Active Storage not display @user.banner_image [duplicate]
问题 This question already has answers here : to_model delegated to attachment, but attachment is nil (2 answers) Closed 3 months ago . So I've been playing with rails active storage lately and came across an issue. user.rb class User < ApplicationRecord has_one_attached :banner_image end show.html.haml .profile-header = @user.banner_image in return i get this error: Can't resolve image into URL: to_model delegated to attachment, but attachment is nil Extracted source (around line #2): .profile