Skip to content

Instantly share code, notes, and snippets.

@huobazi
Created June 21, 2011 05:07
Show Gist options
  • Save huobazi/1037280 to your computer and use it in GitHub Desktop.
Save huobazi/1037280 to your computer and use it in GitHub Desktop.
create some test topics
user = User.create :username => 'test', :email => '[email protected]', :password => 'test@123456', :password_confirmation => 'test@123456'
30.times do |n|
topic = user.topics.create :title => "My Topic #{n}", :content => "Here is topic content", :tags => "tag,Test"
10.times do
reply = Reply.new :content => 'Here is reply content'
reply.user = user
reply.topic = topic
reply.save
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment