Merge pull request #999 from differentreality/user_bio_count

Fix bio length when nil in user#edit
This commit is contained in:
Christian Bruckmayer 2016-05-19 10:19:29 +02:00
commit 5c4fba8b44

View file

@ -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