For my User which has_one_attached :avatar I can get the url in my views with <%= image_tag url_for(user.avatar) %>.
So, in controller I would use just url_for(user.avatar)
For Category which has_one_attached :image:
url_for(category.image)