about summary refs log tree commit diff
path: root/app/models/account.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/account.rb')
-rw-r--r--app/models/account.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index 8187bc7d9..d30c2a9ec 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -313,6 +313,10 @@ class Account < ApplicationRecord
     self[:also_known_as] || []
   end
 
+  def field
+    @field ||= fields.map { |f| [f.name, f.value] }.to_h
+  end
+
   def fields
     (self[:fields] || []).map { |f| Field.new(self, f) }
   end
@@ -352,6 +356,7 @@ class Account < ApplicationRecord
     self.fields = tmp
   end
 
+  # needs to be removed after migration
   def vars
     self[:vars]
   end