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 | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'app/views/resources/edit.html.erb') 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 %> -- cgit v1.2.3