我将 Refile 与 Rails 4 应用程序一起使用。
我收到错误:undefined method
accepts_attachments_for'`
我正在尝试上传多张图片,并且有两种模型:书籍和 blob。
我的书.rb:
has_many :blobs, dependent: :destroy
accepts_attachments_for :blobs
我的 blobs.rb:
belongs_to :book
attachment :file
如果我检查 rake 路由,它显示 refile 已挂载,那么问题是什么?
最佳答案
此处讨论了您要使用的功能:https://github.com/refile/refile/issues/6而且它似乎还没有发布。如果你想使用它,你需要使用 master 分支。您可以通过更改 Gemfile 来尝试使用 master 分支:
gem 'refile', require: "refile/rails", git: 'https://github.com/refile/refile.git', branch: 'master'
关于ruby-on-rails - 重新提交 accepts_attachments_for issue,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31167052/