mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-20 06:01:32 -04:00
Use to_param to make parts of the csv filename
This commit is contained in:
1 parent
061bd31220
commit
4587dc711f
1 file changed
+2
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user