lib/faker/address.rb
# Returns a uk city or the uk city associated with a uk county
# based on city with the same index as the county
Returns a uk city or the uk city associated with a uk county
based on city with the same index as the county
Returns a uk city or the uk city associated with a uk county based on city with the same index as the county
def uk_city(county = nil)
        if county.blank?
          fetch('address.uk_city')
        else
          index = I18n.translate(:faker)[:address][:uk_county].index(county)
          city = I18n.translate(:faker)[:address][:uk_city][index] if index
          city ? city : fetch('address.uk_city')
        end  
      end
def uk_city ( county = nil ) if county . blank? fetch ( 'address.uk_city' ) else index = I18n . translate ( :faker ) [ :address ] [ :uk_county ] . index ( county ) city = I18n . translate ( :faker ) [ :address ] [ :uk_city ] [ index ] if index city ? city : fetch ( 'address.uk_city' ) end end
Returns a uk city or the uk city associated with a uk county
based on city with the same index as the county
Returns a uk city or the uk city associated with a uk county based on city with the same index as the county
county