1
我在後端安裝了回形針寶石,並希望將翡翠寶石作爲我的前端;但是,我正在生成未定義方法文件的錯誤。與我沒有使用的教程不同,我將它命名爲:photo代替。這是否有所作爲?或者問題是從其他方面發生的?冬宮寶石不顯示我的照片(ROR)
錯誤消息
未定義的方法'文件」的#
觀點:
<%= render_gallery_for @galleries %>
遷移
class AddAttachmentToGalleries < ActiveRecord::Migration
def self.up
add_attachment :galleries, :photo
end
def self.down
remove_attachment :galleries, :photo
end
end