0

In my Rails 4.2 app, the file uploads stopped working for the model which has following

acts_as_nested_set counter_cache: :children_count, touch: true

Removing this line, the uploads starts working again. I'm managinh content via RailsAdmin using Carrierwave and fog-google gems. File uploads for other models are working fine which uses the same uploader. I can update or create record fine but the image is not being uploaded. It fails without any error.

lightsaber
  • 1,481
  • 18
  • 37

1 Answers1

1

Moving acts_as_nested_set counter_cache: :children_count, touch: true after setting uploader in model solved this issue.

lightsaber
  • 1,481
  • 18
  • 37
  • Thanks for sharing this! I was able to find this only after I figured it out myself :( There go 2 hours... – Andrew K May 12 '17 at 23:50
  • Also for anyone interested in learning more, feel free to check out the issue: https://github.com/carrierwaveuploader/carrierwave/issues/2174 – Andrew K May 12 '17 at 23:55