2
3
4
5
6
7
8
9
10
11
12
13
|
# File 'lib/rails/generators/moxie_forum/templates/migration.rb', line 2
def self.up
INSERT_SCHEMA
f = Moxie::Forum.create( :title => "Sample forum", :description => "Description of this forum" )
t1 = Moxie::Topic.create( :forum => f, :title => "First topic" )
t2 = Moxie::Topic.create( :forum => f, :title => "Second topic" )
Moxie::Post.create( :topic => t1, :body => "First post in the first topic" )
Moxie::Post.create( :topic => t1, :body => "Second post in the first topic" )
Moxie::Post.create( :topic => t2, :body => "First post in the second topic" )
end
|