From d242fb5bbc423876f4c192b5f133619a2d4f0113 Mon Sep 17 00:00:00 2001 From: hellekin Date: Fri, 9 Oct 2020 10:29:34 +0200 Subject: Scope routes to Agent Since an Agent is required for all records, we scope the routes and get it present for free ;) This commit also adds resource views. --- app/views/resources/_edit.html.erb | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 app/views/resources/_edit.html.erb (limited to 'app/views/resources/_edit.html.erb') diff --git a/app/views/resources/_edit.html.erb b/app/views/resources/_edit.html.erb new file mode 100644 index 0000000..fdb2921 --- /dev/null +++ b/app/views/resources/_edit.html.erb @@ -0,0 +1,6 @@ +

Edit <%= resource.presence&.name || 'new resource' %>

+

Context: <%= current_agent %>

+ +<%= form_with model: [current_agent,@resource] do |f| %> + <%= render partial: 'form', locals: { resource: resource, f: f } %> +<% end %> -- cgit v1.2.3