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:
Diffstat (limited to 'app/models/users/credit_card_validation.rb')
-rw-r--r--app/models/users/credit_card_validation.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/users/credit_card_validation.rb b/app/models/users/credit_card_validation.rb
index a4cc43d1f13..556ee03605d 100644
--- a/app/models/users/credit_card_validation.rb
+++ b/app/models/users/credit_card_validation.rb
@@ -9,6 +9,7 @@ module Users
belongs_to :user
validates :holder_name, length: { maximum: 26 }
+ validates :network, length: { maximum: 32 }
validates :last_digits, allow_nil: true, numericality: {
greater_than_or_equal_to: 0, less_than_or_equal_to: 9999
}
@@ -17,7 +18,7 @@ module Users
self.class.where(
expiration_date: expiration_date,
last_digits: last_digits,
- holder_name: holder_name
+ network: network
).order(credit_card_validated_at: :desc).includes(:user)
end
end