diff --git a/app/models/communication/block/template/organization/element.rb b/app/models/communication/block/template/organization/element.rb index 527a6bf1867e7da6d77ca8792abec7a17c237545..6ef7c4c8f2567210416aced7650239896143e71c 100644 --- a/app/models/communication/block/template/organization/element.rb +++ b/app/models/communication/block/template/organization/element.rb @@ -17,7 +17,7 @@ class Communication::Block::Template::Organization::Element < Communication::Blo organization ? organization.url : url end - def best_logo + def best_logo_blob organization ? organization.logo.blob : logo_component.blob end diff --git a/app/views/admin/communication/blocks/templates/organizations/_show.html.erb b/app/views/admin/communication/blocks/templates/organizations/_show.html.erb index 5e3ea877bdc3797ddcc3a6518e04cc9909808892..da0688f65b857beb1f33dbadb37b3b4c5d817422 100644 --- a/app/views/admin/communication/blocks/templates/organizations/_show.html.erb +++ b/app/views/admin/communication/blocks/templates/organizations/_show.html.erb @@ -47,9 +47,9 @@ </a> <% end %> </h3> - <% if element.best_logo %> + <% if element.best_logo_blob %> <div class="media"> - <%= kamifusen_tag element.best_logo, width: 600%> + <%= kamifusen_tag element.best_logo_blob, width: 600 %> </div> <% end %> </article> diff --git a/app/views/admin/communication/blocks/templates/organizations/_snippet.html.erb b/app/views/admin/communication/blocks/templates/organizations/_snippet.html.erb index 2b9fb6e874f89fb7e6a5d4d92a84ed841b13c014..170f443095a97aa2dbfa6918318235cc6cff5228 100644 --- a/app/views/admin/communication/blocks/templates/organizations/_snippet.html.erb +++ b/app/views/admin/communication/blocks/templates/organizations/_snippet.html.erb @@ -1,7 +1,7 @@ <% block.template.elements.first(3).each do |element| %> <div class="me-2 bg-light p-2"> - <% if element.best_logo.attached? %> - <%= kamifusen_tag element.best_logo %> + <% if element.best_logo_blob %> + <%= kamifusen_tag element.best_logo_blob %> <% else %> <p><%= element.best_name %></p> <% end %>