1

I have a user model created with devise. I want to allow these users to upload a profile picture.

I am using carrierwave for this and followed the rails cast to do so. However the uploader will not work.

I had a look at https://github.com/carrierwaveuploader/carrierwave/wiki/How-to:-use-carrierwave-with-devise

But this did not really help. I am now getting this error:

NoMethodError in Devise::RegistrationsController#update
undefined method `marked_for_destruction?' for #<ProfilePictureUploader:0x007fa585b7a638>

I cannot see anythign that is wrong with my code, I followed the rails cast perfectly. The only thing I can think of is that the railscast uses rails 3 and i am using rails 4

Any ideas?

jmromer
  • 2,212
  • 1
  • 12
  • 24
Lewis Frost
  • 557
  • 1
  • 5
  • 25

1 Answers1

0

I think you might mount uploader on the wrong field.

Checkout mount_uploader :file, AttachmentUploader is on the right field.

Kesha Antonov
  • 349
  • 5
  • 14