My workaround is to save the directory by a separate attribute:
class MyModel
before_save do
self.content_path ||= "uploads/my_model/contents/#{id}"
end
end
Then your bootloader will look like this:
class YourUploader < CarrierWave::Uploader::Base
...
def store_dir
model.content_path
end
...
end