我正在从使用Paperclip迁移到使用ActiveStorage的过程中。我已经浏览了提供的迁移指南。一个School has_one_attached :logo和一个Logo belongs_to :schoolschool = School.find(119)Module::DelegationError Exception: id delegated to attachment, but attachment is nil
运行的底层查询
我有两个不同的设计-- => Users (=赞成)和Parents (=父母)
在家长主页上,我可以访问pros的所有参数并显示它们,但avatarresolve the image to URL: to_model delegated to the attachment, but the attachment is nil和Rails确认没有附件,但是在pro_model和pros_controller视图中,我可以得到这个附件。%></p>