In my working version I noticed that on the refund page
Given that only few of the individuals are taking a refund
The fields of the others are empty
Now only the refunds taken have to be taken
and the line
if params["#{user.id}"][:amount] # in the file refund_controller.rb , method create
is supposed to handle it, However it doesn't seem to do so in mine
so I changed it to
if !(params["#{user.id}"][:amount].to_i.zero?)
and it seems to work because irespective of it is "0",0.0 or nil it throws false
please let me know if the solution is right or if I am missing something
In my working version I noticed that on the refund page Given that only few of the individuals are taking a refund The fields of the others are empty
Now only the refunds taken have to be taken and the line if params["#{user.id}"][:amount] # in the file refund_controller.rb , method create is supposed to handle it, However it doesn't seem to do so in mine
so I changed it to if !(params["#{user.id}"][:amount].to_i.zero?)
and it seems to work because irespective of it is "0",0.0 or nil it throws false
please let me know if the solution is right or if I am missing something