chore: Normalize portal slug to nil (#5487)

This commit is contained in:
Sojan Jose
2022-09-22 14:08:48 -07:00
committed by GitHub
parent b463ce5b1a
commit 913224ad84
3 changed files with 14 additions and 0 deletions

View File

@@ -11,4 +11,12 @@ class ApplicationRecord < ActiveRecord::Base
"#{self.class.name}Drop".constantize.new(self)
end
private
def normalize_empty_string_to_nil(attrs = [])
attrs.each do |attr|
self[attr] = nil if self[attr].blank?
end
end
end