1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/factories/country_states.rb

18 lines
328 B
Ruby
Raw Normal View History

2018-11-30 21:24:05 +05:00
# frozen_string_literal: true
FactoryBot.define do
2018-11-30 21:32:43 +05:00
factory :country_state do
2018-12-06 05:52:59 +05:00
initialize_with do
2019-03-25 02:13:56 +05:00
CountryState.find_or_initialize_by english_name: english_name
2018-12-06 05:52:59 +05:00
end
2019-04-28 17:48:51 +05:00
english_name do
I18n.with_locale :en do
Faker::Address.unique.state
end
end
2019-03-25 02:13:56 +05:00
native_name { english_name }
2018-11-30 21:24:05 +05:00
end
end