mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 17:28:18 +02:00
Edit country select in forms
This commit is contained in:
parent
7537bb3712
commit
195aa4a890
7 changed files with 147 additions and 104 deletions
|
@ -55,7 +55,7 @@ class Address < ActiveRecord::Base
|
|||
def addr_hash_from_params(addr)
|
||||
return {} if addr.nil?
|
||||
return {} unless addr[:addr].is_a?(Hash)
|
||||
{ country_id: Country.find_by(iso: addr[:addr][:cc]).try(:id),
|
||||
{ country_code: Country.find_by(iso: addr[:addr][:cc]).try(:id),
|
||||
city: addr[:addr][:city],
|
||||
street: pretty_street(addr[:addr][:street]), # [0],
|
||||
# street2: addr[:addr][:street][1],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue