Sha256: b86e3e7772dc0cc2d2e866bf8b26c3589826116ace882ed5d0f13bf064bc04be
Contents?: true
Size: 1.41 KB
Versions: 28
Compression:
Stored size: 1.41 KB
Contents
# == Schema Information # # Table name: addresses # # id :integer not null, primary key # street1 :string(255) # street2 :string(255) # city :string(64) # state :string(64) # zipcode :string(16) # country :string(64) # full_address :string(255) # address_type :string(16) # addressable_id :integer # addressable_type :string(255) # created_at :datetime # updated_at :datetime # deleted_at :datetime # <% require "ffaker" puts "Loading addresses..." type = %w(Billing Shipping) addressable = %w(Account Contact Lead) for i in (1 .. rand(200) + 200) do %> address_<%= i %>: id : <%= i %> addressable_id : <%= i/2 %> addressable_type : <%= asset = addressable.sample %> address_type : <%= asset == 'Account' ? type.sample : 'Business' %> street1 : <%= street1 = FFaker::Address.street_address %> street2 : <%= street2 = FFaker::Address.street_address %> city : <%= city = FFaker::Address.city %> state : <%= state = FFaker::AddressUS.state_abbr %> zipcode : <%= zipcode = FFaker::AddressUS.zip_code %> country : US full_address : | <%= street1 %> <%= street2 %> <%= "#{city}, #{state} #{zipcode}" %> US <% end %>
Version data entries
28 entries across 28 versions & 2 rubygems