Use to_param to make parts of the csv filename

This commit is contained in:
Brenda Wallace committed 2019-01-06 08:45:42 +13:00
1 parent 061bd31220
commit 4587dc711f
1 file changed
+2 -2
+2 -2
View File
@@ -74,9 +74,9 @@ class HarvestsController < ApplicationController
def csv_filename
specifics = if @owner
"#{@owner.login_name}-"
"#{@owner.to_param}-"
elsif @crop
"#{@crop.name}-"
"#{@crop.to_param}-"
end
"Growstuff-#{specifics}Harvests-#{Time.zone.now.to_s(:number)}.csv"
end