Skip to content

Commit

Permalink
Needed to check if category id was nil
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Youch committed Oct 13, 2010
1 parent f5212ca commit fd4256c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vendor/modules/blog/app/models/blog/add_blog_wizard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def blog
def create_dummy_category(num=1)
name = DummyText.words(1).split(' ')[0..1].join(' ')
category = self.blog.blog_categories.create :name => name
category = self.blog.blog_categories.create(:name => "#{name} #{num}") if category.nil?
category = self.blog.blog_categories.create(:name => "#{name} #{num}") if category.id.nil?
category
end

Expand Down

0 comments on commit fd4256c

Please sign in to comment.