Hi,
In my layout, I have the following tags in the <head
:
<meta property="og:title" content="<%= page_title(app_name: 'My site', page_title_symbol: :site_page_title, reverse: true) %>" />
<meta property="og:type" content="website" />
<meta property="og:url" content="<%= request.original_url %>" />
<% if content_for?(:og_image) %>
<meta property="og:image" content="<%= yield(:og_image) %>" />
<% else %>
<meta property="og:image" content="<%= request.base_url + asset_path('picture-of-me.jpg') %>" />
<% end %>
I have a page in my app with a turbo frame and at the top (outside the frame) I have:
<% if @album.photo %>
<% content_for(:og_image, @album.photo.url(:large)) %>
<% end %>
How can I get this to update when the content in the turbo frame is changed?
Thanks,
Neil