This commit is contained in:
邱博亞 2023-11-18 10:01:06 +08:00
parent ce36d284e6
commit 076e7cc688
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ namespace :fgu_sync do
end
end
def parse_date(d)
(d.present? ? (Date.parse(d) rescue Date.today) : nil)
(d.present? ? (Date.parse(d) rescue nil) : nil)
end
def camelize(str)
str.split('_').map{|v| v.capitalize}.join(' ')