Skip to content

Instantly share code, notes, and snippets.

@lazyatom
Forked from tomlea/factory_with_callbacks.rb
Created June 11, 2009 16:17
Show Gist options
  • Save lazyatom/128025 to your computer and use it in GitHub Desktop.
Save lazyatom/128025 to your computer and use it in GitHub Desktop.
# Boom
Factory.define(:product) do |product|
product.handles do |p| # or whatever the has_many is called
Array.new(5) { x.association(:handle) } # return an array, as many as you like.
end
# etc
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment