You need to pass hash (data
) instead of Country
instance.
render :json => @countries.map { |c| [c.id, ::ISO3166::Country[c.country].data] }
If you want only country name, use name
:
render :json => @countries.map { |c| [c.id, ::ISO3166::Country[c.country].name] }