G
Guillaume Loader
Hello everyone!
Do you have a better way to do this ?
sentence = "Your ticket has expired since #{nb_of_days if nb_of_days<0}
#{'days' if nb_of_days<0} #{'today' if nb_of_days==0}"
My goal is to print something like this : "Your ticket has expired since
4 days" or "Your ticket has expired since today"
I've tried this :
sentence = "Your ticket has expired since #{nb_of_days + 'days' if
nb_of_days<0} #{'today' if nb_of_days==0}"
But it doesn't work!
Thank you for your help
Do you have a better way to do this ?
sentence = "Your ticket has expired since #{nb_of_days if nb_of_days<0}
#{'days' if nb_of_days<0} #{'today' if nb_of_days==0}"
My goal is to print something like this : "Your ticket has expired since
4 days" or "Your ticket has expired since today"
I've tried this :
sentence = "Your ticket has expired since #{nb_of_days + 'days' if
nb_of_days<0} #{'today' if nb_of_days==0}"
But it doesn't work!
Thank you for your help