Skip to content

Instantly share code, notes, and snippets.

@beccasaurus
Created January 28, 2009 22:59
Show Gist options
  • Save beccasaurus/54243 to your computer and use it in GitHub Desktop.
Save beccasaurus/54243 to your computer and use it in GitHub Desktop.
# different possible syntaxes for generating models
Factory(:user, :foo => 'bar', :chunky => 'bacon')
Factory.build(:user, :foo => 'bar', :chunky => 'bacon')
User.generate :foo => 'bar', :chunky => 'bacon'
User.build :foo => 'bar', :chunky => 'bacon'
User.gen :foo => 'bar', :chunky => 'bacon'
User.make :foo => 'bar', :chunky => 'bacon'
User.create_new :foo => 'bar', :chunky => 'bacon'
User.create_valid :foo => 'bar', :chunky => 'bacon'
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment