Permalink
Browse files

word count

  • Loading branch information...
1 parent 7a56d11 commit 7e22df1ea05044ebbc2ad27dacafb6e4c6dbb407 @stefl committed Aug 17, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 models/post.rb
View
@@ -11,7 +11,7 @@ class Post
before_save :calculate_word_count
def calculate_word_count
- word_count = content.to_s.scan(/(\w|-)+/).size
+ self.word_count = content.to_s.scan(/(\w|-)+/).size
end
FILENAME_FORMAT = /^(\d+-\d+-\d+)-(.*)(\.[^.]+)$/

0 comments on commit 7e22df1

Please sign in to comment.