From 1a2cf3b14f8ed876b083ae9b69a52894942acb42 Mon Sep 17 00:00:00 2001 From: Bat Date: Wed, 27 Jun 2018 20:43:09 +0200 Subject: [PATCH] What if I use the correct name for the this field? Fix #81 --- src/routes/comments.rs | 3 ++- templates/posts/details.html.tera | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/routes/comments.rs b/src/routes/comments.rs index 232b4db..ee5112b 100644 --- a/src/routes/comments.rs +++ b/src/routes/comments.rs @@ -15,7 +15,7 @@ use plume_models::{ }; use inbox::Inbox; -#[derive(FromForm)] +#[derive(FromForm, Debug)] struct NewCommentForm { pub responding_to: Option, pub content: String @@ -26,6 +26,7 @@ fn create(blog_name: String, slug: String, data: LenientForm, us let blog = Blog::find_by_fqn(&*conn, blog_name.clone()).unwrap(); let post = Post::find_by_slug(&*conn, slug.clone(), blog.id).unwrap(); let form = data.get(); + println!("form: {:?}", form); let (new_comment, id) = NewComment::build() .content(form.content.clone()) diff --git a/templates/posts/details.html.tera b/templates/posts/details.html.tera index 5c3d45c..4cb1956 100644 --- a/templates/posts/details.html.tera +++ b/templates/posts/details.html.tera @@ -64,7 +64,7 @@
{% if previous %} - + {% endif %} {# Ugly, but we don't have the choice if we don't want weird paddings #}