You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a model A that uses Carrierwave Crop and when I submit a nested form that includes multiple model Bs that has an image, I get the following error. Character is Model B.
Model A has many Model B and Model B belongs to Model A
undefined method `image_coverpage_crop_x' for #<Character:0x007fcfdd064528>
if @vn.update(vn_params) // This is the line that raises the error
I have ensured that the strong params in Model A includes the cropping fields and that it allows nested attributes. Everything works fine if I update Model A by itself or Model B by itself. Updating all of them at the same time causes the error.
The text was updated successfully, but these errors were encountered:
My quick and dirty fix was to include this field in Model B which does not actually exist and only exists in Model A. Is there a better workaround other than this to solve the issue?
I have a model A that uses Carrierwave Crop and when I submit a nested form that includes multiple model Bs that has an image, I get the following error. Character is Model B.
Model A has many Model B and Model B belongs to Model A
I have ensured that the strong params in Model A includes the cropping fields and that it allows nested attributes. Everything works fine if I update Model A by itself or Model B by itself. Updating all of them at the same time causes the error.
The text was updated successfully, but these errors were encountered: