I am learning rails as I develop a prototype app. It has been a great journey so far, at least until I got into file uploads a few days ago.
Multiple models in the app need to save one or more images, so I decided to use polymorphic associations.
Until I understand how to use direct_upload for local storage (I struggle to find proper guidance on this that includes javascript), I decided to stick to a single image per model record.
I am getting the undefined method `image_data' when I submit the form. The Image Uploader is being called when the :image param is seen as confirmed by the creation of a cached file (STORE[cache] ImageUploader[:image] Client 1 file (0.03s)).
The error appears to occur when the model object is created.

I am not expert, but one reason I am thinking of is that Shrine is trying to access the image_data method in the client model, which is not available. I am saying this because the client object (but not the associated image record) saves successfully is I add "attr_accessor :image_data" in the client model file.
Thank you all in advance for your assistance.
Luca