Skip to content

Instantly share code, notes, and snippets.

@ohookins
Created November 19, 2013 13:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ohookins/7545074 to your computer and use it in GitHub Desktop.
Save ohookins/7545074 to your computer and use it in GitHub Desktop.
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