I try to add Shrine gem to an existing project that uses Paperclip. I added a Shrine image to a new model (just for a check). So I created model Country with this db table:
create_table "countries", force: :cascade do |t|
t.string "name"
t.text "image_data"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
and this model:
class Country < ApplicationRecord
include ImageUploader::Attachment(:image)
validates :name, length: { in: 2..180 }, presence: true
end
After that I tried to get image from country and received this (image_data works, though):
I thought that maybe it's because image is empty, but in another app with shrine everything works correctly
Does anyone know how to fix this?