2
查找分区域名称,使用carmen rails gem来选择国家和分区域。在实施数据库后保存国家代码和子区域代码。
我可以从代码中使用这个@country_name = Carmen::Country.coded(country_code)
现在我想从子区域代码中获取子区域名称。
帮我解决这个问题。Rails carmen-rails gem,按分区域代码
查找分区域名称,使用carmen rails gem来选择国家和分区域。在实施数据库后保存国家代码和子区域代码。
我可以从代码中使用这个@country_name = Carmen::Country.coded(country_code)
现在我想从子区域代码中获取子区域名称。
帮我解决这个问题。Rails carmen-rails gem,按分区域代码
coded
和named
与Carmen::Country
一起使用的方法也可以与子区域集合一起使用。
@country = Carmen::Country.coded(country_code)
@subregion = @country.subregions.coded(subregion_code)