Refile accepts_attachments_for issue

I am using Refile with rails 4.

I am getting the error: undefined method

accepts_attachments_for ''

I am trying to do multiple image uploads and have two models, books and blobs.

My .rb books:

has_many :blobs, dependent: :destroy
accepts_attachments_for :blobs

      

My blobs.rb:

belongs_to :book
attachment :file

      

If I check the rake routes it shows that the refix is ​​set, so what's the problem?

+3


source to share


1 answer


The feature you want to use is discussed here: https://github.com/refile/refile/issues/6 and doesn't seem to have been released yet. If you want to use it, you need a master branch. You can try using master branch by changing your Gemfile:



gem 'refile', require: "refile/rails", git: 'https://github.com/refile/refile.git', branch: 'master'

      

+6


source







All Articles