about summary refs log tree commit diff
path: root/db
diff options
context:
space:
mode:
authorchr <chr@cybre.space>2019-06-23 15:50:16 -0700
committerchr <chr@cybre.space>2021-03-01 21:31:50 -0800
commit9f593a36ad95075a9a4778ab173dc76ffe202d71 (patch)
tree72cb49ae15722f5ac88c9284a44cce74e415925f /db
parent633d175146d6acaf2cc4bfbfcfdee4c85ef20ed1 (diff)
Cybrespace locale
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20171026200500_en_to_en_cy.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/db/migrate/20171026200500_en_to_en_cy.rb b/db/migrate/20171026200500_en_to_en_cy.rb
new file mode 100644
index 000000000..0035e1dcd
--- /dev/null
+++ b/db/migrate/20171026200500_en_to_en_cy.rb
@@ -0,0 +1,17 @@
+class EnToEnCy < ActiveRecord::Migration[5.1]
+  def up
+    User.find_each do |user|
+      if user.locale == 'en'
+        user.update(locale: 'en-CY')
+      end
+    end
+  end
+
+  def down
+    User.find_each do |user|
+      if user.locale == 'en-CY'
+        user.update(locale: 'en')
+      end
+    end
+  end
+end