Skip to content

Instantly share code, notes, and snippets.

@rgraff
Forked from mpeychich/gist:144014
Created July 9, 2009 22:47
Show Gist options
  • Save rgraff/144066 to your computer and use it in GitHub Desktop.
Save rgraff/144066 to your computer and use it in GitHub Desktop.
Factory.define :venue do |v|
v.name 'Foo Place'
v.url {Factory.next(:url_slug)}
v.address_hint 'MyString'
v.phone '(805) 555-1212'
v.capacity 'MyString'
v.website 'example.com'
v.image 'MyString'
v.description 'MyText'
v.directions 'MyText'
v.handicap_info 'MyText'
v.handicap_availability 0
v.custom_seattypes 'MyText'
v.geocode_latitude 9.99
v.geocode_longitude 9.99
v.active true
v.created_by_user {|a| a.association(:user)}
v.postal_code {|r| r.address.postal_code_object}
v.address {|a| a.association(:address, {:postal_code => a.postal_code.postal_code, :country_name => a.postal_code.country_name})}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment