Edit <%= @resource.presence.name || 'new resource' %>
Context: <%= current_agent %>
<%= form_with model: @resource, url: @resource.presence.new_record? ? agent_resources_path(current_agent) : resource_path(@resource.resource) do |f| %>
<%= render partial: 'form', locals: { resource: resource, f: f } %>
<% end %>