ActiveStorage and uuid
ActiveStorage doesn’t play well with models using uuid. Here’s how to convert ActiveStorage to use uuid and fix errors like ‘activestorage ERROR: operator does not exist: bigint = uuid’
ActiveStorage doesn’t play well with models using uuid. Here’s how to convert ActiveStorage to use uuid and fix errors like ‘activestorage ERROR: operator does not exist: bigint = uuid’
Gems like paperclip have made file uploads easy. But something as simple as attaching images to models can get messy and repetitive in a large application. By using a combination of single table inheritance and polymorphic association, we can build dry code and make it easier to manage files.