Skip to content

Commit

Permalink
Remove unnecessary to_s from try_type_from_number
Browse files Browse the repository at this point in the history
Our CARD_TYPES hash now uses strings as keys so we no longer need to
stringify them.
  • Loading branch information
jhawthorn committed Sep 29, 2016
1 parent 735a8e5 commit 001122e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/app/models/spree/credit_card.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def set_last_digits
# number, otherwise the empty string
def try_type_from_number
CARD_TYPES.each do |type, pattern|
return type.to_s if number =~ pattern
return type if number =~ pattern
end
''
end
Expand Down

0 comments on commit 001122e

Please sign in to comment.