I need to get the path to the file on disk which is using ActiveStorage. The file is stored locally.
ActiveStorage
When I was using paperclip, I used the path<
path<
Just use:
ActiveStorage::Blob.service.send(:path_for, user.avatar.key)
You can do something like this on your model:
class User < ApplicationRecord has_one_attached :avatar def avatar_on_disk ActiveStorage::Blob.service.send(:path_for, avatar.key) end end