Prevent nil input to turn into 0

This commit is contained in:
Pau Perez
2020-03-17 19:25:11 +01:00
parent 6ceeda7d9e
commit 38ea95ea85
2 changed files with 2 additions and 3 deletions

View File

@@ -8,7 +8,7 @@ class TruncateData
end
def initialize(months_to_keep = nil)
@date = (months_to_keep || 3).months.ago
@date = (months_to_keep || 3).to_i.months.ago
end
def call