From 50ab392c0ff85b1547c1715eca2aaa69d8b1b00e Mon Sep 17 00:00:00 2001 From: Stella Rouzi Date: Sun, 15 May 2016 13:17:53 +0300 Subject: [PATCH] Fix bio length when nil in user#edit --- app/views/users/edit.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml index 28ea3fb6..4fa47b82 100644 --- a/app/views/users/edit.html.haml +++ b/app/views/users/edit.html.haml @@ -17,7 +17,7 @@ = f.input :biography, input_html: { rows: 5, 'onkeyup' => "word_count(this, 'biography-count', 150)" } You have used %span#bio_length - = @user.biography.split.length + = @user.biography ? @user.biography.split.length : 0 words. Biographies are limited to 150 words. %br %br