From 0a2e76526b4fdb0edfcaa3697f4eea9e9c7c8eea Mon Sep 17 00:00:00 2001 From: Lars Henrik Mai Date: Sat, 29 Mar 2014 19:34:42 +0100 Subject: =?UTF-8?q?kinda=20works=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/application.html.erb | 1 + app/views/pois/_form.html.erb | 16 ++++++---------- app/views/pois/new.html.erb | 4 ---- 3 files changed, 7 insertions(+), 14 deletions(-) (limited to 'app/views') diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index c941b11..c418005 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -5,6 +5,7 @@ <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %> <%= javascript_include_tag "application", "data-turbolinks-track" => true %> <%= csrf_meta_tags %> + diff --git a/app/views/pois/_form.html.erb b/app/views/pois/_form.html.erb index 26db79d..e9006c9 100644 --- a/app/views/pois/_form.html.erb +++ b/app/views/pois/_form.html.erb @@ -1,3 +1,5 @@ +
+ <%= form_for(@poi) do |f| %> <% if @poi.errors.any? %>
@@ -11,20 +13,14 @@
<% end %> -
-
<%= f.label :message %>
<%= f.text_area :message %>
-
- <%= f.label :lat %>
- <%= f.text_field :lat %> -
-
- <%= f.label :lon %>
- <%= f.text_field :lon %> -
+ + <%= f.hidden_field :lat %> + <%= f.hidden_field :lon %> +
<%= f.submit %>
diff --git a/app/views/pois/new.html.erb b/app/views/pois/new.html.erb index ea4ebe0..2d34363 100644 --- a/app/views/pois/new.html.erb +++ b/app/views/pois/new.html.erb @@ -1,5 +1 @@ -

New poi

- <%= render 'form' %> - -<%= link_to 'Back', pois_path %> -- cgit v1.2.1