Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/backbone.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 如何在globalize中删除区域设置?_Ruby On Rails_Activerecord_Globalize - Fatal编程技术网

Ruby on rails 如何在globalize中删除区域设置?

Ruby on rails 如何在globalize中删除区域设置?,ruby-on-rails,activerecord,globalize,Ruby On Rails,Activerecord,Globalize,我正在使用添加模型翻译。 我有ru,enlocale,想从对象中删除enlocale,如何删除 试图以这种方式删除,但它删除了所有具有ru、en语言环境的对象 Country.with_translations(:en).find(1).destroy 试试这个: country.translations.find_by(locale: :en).destroy

我正在使用添加模型翻译。
我有
ru,en
locale,想从对象中删除
en
locale,如何删除

试图以这种方式删除,但它删除了所有具有ru、en语言环境的对象

Country.with_translations(:en).find(1).destroy
试试这个:

country.translations.find_by(locale: :en).destroy