Created
November 19, 2013 13:06
-
-
Save ohookins/7545074 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'data_mapper' | |
require './models/user' | |
require './models/post' | |
require './models/comment' | |
module Seed | |
extend self | |
def run | |
User.create(:firstname => "John", :lastname => "Smith", :username => "johnsmith") | |
Post.create(:author => "johnsmith", :text => "I am a web developer!") | |
Comment.create(:post => 1, :author => "anonymous", :text => "I wish to subscribe to your newsletter!") | |
end | |
end | |
if __FILE__ == $0 | |
Seed.run() | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment