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

Version Path
fat_free_crm-0.22.1 db/demo/addresses.yml
fat_free_crm-0.22.0 db/demo/addresses.yml
fat_free_crm-0.21.0 db/demo/addresses.yml
fat_free_crm-0.20.1 db/demo/addresses.yml
fat_free_crm-0.20.0 db/demo/addresses.yml
fat_free_crm-0.19.2 db/demo/addresses.yml
fat_free_crm-0.19.0 db/demo/addresses.yml
fat_free_crm-0.18.2 db/demo/addresses.yml
fat_free_crm-0.14.2 db/demo/addresses.yml
fat_free_crm-0.15.2 db/demo/addresses.yml
fat_free_crm-0.16.4 db/demo/addresses.yml
fat_free_crm-0.17.3 db/demo/addresses.yml
fat_free_crm-0.18.1 db/demo/addresses.yml
fat_free_crm-0.18.0 db/demo/addresses.yml
fat_free_crm-0.14.1 db/demo/addresses.yml
fat_free_crm-0.15.1 db/demo/addresses.yml
fat_free_crm-0.16.3 db/demo/addresses.yml
fat_free_crm-0.17.2 db/demo/addresses.yml
fat_free_crm-0.16.2 db/demo/addresses.yml
fat_free_crm-0.17.1 db/demo/addresses.yml