aboutsummaryrefslogtreecommitdiff
path: root/app/views/resources/edit.html.erb
diff options
context:
space:
mode:
authorhellekin <hellekin@cepheide.org>2020-10-09 10:29:34 +0200
committerhellekin <hellekin@cepheide.org>2020-10-09 10:29:34 +0200
commitd242fb5bbc423876f4c192b5f133619a2d4f0113 (patch)
tree5da6478cd67c49406d8678aa7e99f949419f905c /app/views/resources/edit.html.erb
parentf48ce2f4c934fde3862cdad593eececc7a567d61 (diff)
downloadincommon-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.erb17
1 files changed, 1 insertions, 16 deletions
diff --git a/app/views/resources/edit.html.erb b/app/views/resources/edit.html.erb
index b051bae..80d8206 100644
--- a/app/views/resources/edit.html.erb
+++ b/app/views/resources/edit.html.erb
@@ -1,17 +1,2 @@
-<%= form_with model: @resource, local: true do |f| %>
- <%= tag.legend " " %>
- <%= f.label :name %>
- <%= f.text_field :name, value: @resource.name %>
-
- <%= tag.legend " " %>
- <%= f.label :categories %>
- <%= f.text_field :categories, value: @resource.categories %>
+<%= render partial: 'edit', locals: { resource: @resource } %>
- <%= tag.legend "Coordonées géographiques" %>
- <%= f.label :longitude %>
- <%= f.text_field :longitude, value: @resource.lon %>
- <%= f.label :latitude %>
- <%= f.text_field :latitude, value: @resource.lat %>
-
- <%= f.submit 'Save' %>
-<% end %>