Why is this image_tag not working?
If I try and put this code:
<% if notification.actor.avatar.attached? %>
<%= image_tag notification.actor.avatar.variant(combine_options: {resize: '150x150^', extent: '150x150', gravity: 'Center'}), class:"rounded-circle" %>
<% else %>
<%= image_tag("fallback/default-avatar-3.png", class:"rounded-circle") %>
<% end %>
into one of my notification layout pages I only get:
Can't resolve image into URL: undefined method `to_model' for #<ActiveStorage::Variant:0x00007fdf8499d7a0>
Did you mean? to_yaml
This works on every other page for me other than the ones for notifications. This also isn't the only thing that doesn't work. Any active storage image will get the same error even if it isn't the same tag. I have no idea what is causing this to happen and I don't really have a good idea of how to fix it. Any way of fixing this error?