diff options
author | hellekin <hellekin@cepheide.org> | 2020-10-09 10:29:34 +0200 |
---|---|---|
committer | hellekin <hellekin@cepheide.org> | 2020-10-09 10:29:34 +0200 |
commit | d242fb5bbc423876f4c192b5f133619a2d4f0113 (patch) | |
tree | 5da6478cd67c49406d8678aa7e99f949419f905c /app/views/resources/_edit.html.erb | |
parent | f48ce2f4c934fde3862cdad593eececc7a567d61 (diff) | |
download | incommon-map-d242fb5bbc423876f4c192b5f133619a2d4f0113.tar.gz |
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.
Diffstat (limited to 'app/views/resources/_edit.html.erb')
-rw-r--r-- | app/views/resources/_edit.html.erb | 6 |
1 files changed, 6 insertions, 0 deletions
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 @@ +<h3>Edit <%= resource.presence&.name || 'new resource' %></h3> +<h2>Context: <%= current_agent %></h2> + +<%= form_with model: [current_agent,@resource] do |f| %> + <%= render partial: 'form', locals: { resource: resource, f: f } %> +<% end %> |