Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Refile accepts_attachments_for issue

I'm using Refile with a rails 4 app.

I'm getting the error: undefined methodaccepts_attachments_for'`

I'm trying to do multiple image upload, and have two models: books and blobs.

My books.rb:

has_many :blobs, dependent: :destroy
accepts_attachments_for :blobs

My blobs.rb:

belongs_to :book
attachment :file

If I check rake routes, it shows that refile is mounted, so what is the issue?

like image 699
the_ Avatar asked Dec 06 '25 05:12

the_


1 Answers

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

gem 'refile', require: "refile/rails", git: 'https://github.com/refile/refile.git', branch: 'master'
like image 155
Aldehir Avatar answered Dec 07 '25 21:12

Aldehir