diff options
author | Peter Leitzen <pleitzen@gitlab.com> | 2019-08-30 14:57:32 +0200 |
---|---|---|
committer | Peter Leitzen <pleitzen@gitlab.com> | 2019-08-30 15:02:49 +0200 |
commit | ef0f3ecb8bac9b6fb40edf3412384b1976247e6e (patch) | |
tree | fd396a509372e68e337cd2d08a7bb61a815781c7 | |
parent | c77674e5f789c8e1158aa4f3a7356862b8461ad4 (diff) | |
download | gitlab-ce-pl-encrypted-props.tar.gz |
Tweak code documentationpl-encrypted-props
-rw-r--r-- | app/models/service.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/service.rb b/app/models/service.rb index fa0a84982ef..1eb6f0328f8 100644 --- a/app/models/service.rb +++ b/app/models/service.rb @@ -169,8 +169,7 @@ class Service < ApplicationRecord true end - # Provide convenient accessor methods - # for each serialized property. + # Provide convenient accessor methods for each serialized property. # Also keep track of updated properties in a similar way as ActiveModel::Dirty def self.prop_accessor(*args) args.each do |arg| @@ -202,8 +201,7 @@ class Service < ApplicationRecord end end - # Provide convenient boolean accessor methods - # for each serialized property. + # Provide convenient boolean accessor methods for each serialized property. # Also keep track of updated properties in a similar way as ActiveModel::Dirty def self.boolean_accessor(*args) self.prop_accessor(*args) @@ -218,6 +216,8 @@ class Service < ApplicationRecord end end + # Provide encryption support for serialized properties. + # Also keep track of updated properties in a similar way as ActiveModel::Dirty def self.prop_accessor_encrypted(*args) encrypted_args = args.flat_map do |arg| ["encrypted_#{arg}", "encrypted_#{arg}_iv"] |