Sha256: 314988456838675e2f0430cf7977e9ee1940e7df72709573365b3c77d865b32f

Contents?: true

Size: 1.4 KB

Versions: 12

Compression:

Stored size: 1.4 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 = Faker::Address.street_address %>
  street2          : <%= street2 = Faker::Address.street_address %>
  city             : <%= city    = Faker::Address.city %>
  state            : <%= state   = Faker::Address.us_state_abbr %>
  zipcode          : <%= zipcode = Faker::Address.zip_code %>
  country          : US
  full_address     : |
                      <%= street1 %>
                      <%= street2 %>
                      <%= "#{city}, #{state} #{zipcode}" %>
                      US
<% end %>

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
fat_free_crm-0.13.6 db/demo/addresses.yml
fat_free_crm-0.13.5 db/demo/addresses.yml
fat_free_crm-0.13.4 db/demo/addresses.yml
fat_free_crm-0.13.3 db/demo/addresses.yml
fat_free_crm-0.13.2 db/demo/addresses.yml
fat_free_crm-0.12.3 db/demo/addresses.yml
fat_free_crm-0.12.2 db/demo/addresses.yml
fat_free_crm-0.13.1 db/demo/addresses.yml
fat_free_crm-0.12.1 db/demo/addresses.yml
fat_free_crm-0.13.0 db/demo/addresses.yml
fat_free_crm-0.12.0 db/demo/addresses.yml
fat_free_crm-0.11.4 db/demo/addresses.yml