Carrierwave Uploads stopped working in model with Awesome Nested Set

49 Views Asked by At

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.

1

There are 1 best solutions below

2
lightsaber On

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