am using carmen rails gem for to select country and subregion. after implemented database saving the country code and subregion code.
I can get the country name from code using this @country_name = Carmen::Country.coded(country_code)
Now i want to get subregion name from subregion code.
Help me to solve this problem.
Asked
Active
Viewed 1,453 times
2

Raj Adroit
- 3,828
- 5
- 31
- 44
1 Answers
7
The coded
and named
methods that you use with Carmen::Country
can also be used with the subregions collection.
@country = Carmen::Country.coded(country_code)
@subregion = @country.subregions.coded(subregion_code)

Skip Baney
- 116
- 1
- 3