我使用了一个rails 4应用程序的重新文件。
我得到了错误:undefined method接受_附件_for‘’
我试图做多个图片上传,并有两个模型:书籍和气泡。
我的books.rb:
has_many :blobs, dependent: :destroy
accepts_attachments_for :blobs我的blobs.rb:
belongs_to :book
attachment :file如果我检查rake路由,它将显示重新文件已被挂载,那么问题是什么?
发布于 2015-07-04 01:13:28
您想要使用的特性在这里讨论:https://github.com/refile/refile/issues/6,它似乎还没有发布。如果您想使用它,则需要使用主分支。您可以通过更改Gemfile来尝试使用主分支:
gem 'refile', require: "refile/rails", git: 'https://github.com/refile/refile.git', branch: 'master'https://stackoverflow.com/questions/31167052
复制相似问题