Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
changing not refer to an undefined value
  • Loading branch information
mschoch committed Oct 4, 2012
1 parent 730d3f1 commit 34114d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/models/article.rb
Expand Up @@ -299,9 +299,9 @@ def initialize(attributes={})

super

self.views = self.attrs[:views] || 0
self.popularity = self.attrs[:popularity] || 0
self.categories = self.attrs[:categories] || []
self.views = self.views || 0
self.popularity = self.popularity || 0
self.categories = self.categories || []
end

def update
Expand Down

0 comments on commit 34114d8

Please sign in to comment.