gitcoinco/code_fund_ads

View on GitHub
app/views/images/edit.html.erb

Summary

Maintainability
Test Coverage
<%= render(PageComponent.new(subject: @imageable)) do |component| %>
  <% component.with(:header) do %>
    <%= render(Page::HeaderComponent.new(title: "Edit Image", subtitle: "for #{@image.name || ""}", buttons: [
      delete_button(link: image_path(@imageable.to_gid_param, @image), title: "Delete image", confirmation_message: I18n.t("images.destroy.confirm"), layout: true)
    ])) %>
  <% end %>
  <% component.with(:body) do %>
    <%= render "/images/form_metadata", imageable: @imageable, image: @image %>
  <% end %>
<% end %>