Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-04-11 12:13:51 +0300
committerJames Lopez <james@jameslopez.es>2016-04-11 12:13:51 +0300
commitbe834c4de93a7716035f5373210ea3922c26da72 (patch)
tree9fc0f290d84ec50fcd32306281359e5ad1a8351a /app/models/project_import_data.rb
parent350a9aa984100a4d91454200fb4ac308108e5cef (diff)
changed a few things based on feedback
Diffstat (limited to 'app/models/project_import_data.rb')
-rw-r--r--app/models/project_import_data.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/models/project_import_data.rb b/app/models/project_import_data.rb
index a0994312003..79efb403058 100644
--- a/app/models/project_import_data.rb
+++ b/app/models/project_import_data.rb
@@ -12,7 +12,11 @@ require 'file_size_validator'
class ProjectImportData < ActiveRecord::Base
belongs_to :project
- attr_encrypted :credentials, key: Gitlab::Application.secrets.db_key_base, marshal: true, encode: true, mode: :per_attribute_iv_and_salt
+ attr_encrypted :credentials,
+ key: Gitlab::Application.secrets.db_key_base,
+ marshal: true,
+ encode: true,
+ mode: :per_attribute_iv_and_salt
serialize :data, JSON
@@ -21,7 +25,7 @@ class ProjectImportData < ActiveRecord::Base
before_validation :symbolize_credentials
def symbolize_credentials
- # bang doesn't work here
+ # bang doesn't work here - attr_encrypted makes it not to work
self.credentials = self.credentials.deep_symbolize_keys unless self.credentials.blank?
end
end