As I'm pretty much a beginner with Rails I wanted to know how best to loop through an array and modify some values. The array is being rendered to a view where the jQuery will receive the data and display it. I want to do the hard work in the Controller (or I might switch to the model at a later date).
The array is called @invoices but in the array is a timestamp which I want to format.
The code to format is:
Time.at(@invoice.date).strftime("%d/%m/%Y")
Could someone show me how to loop through and overwrite the timestamp value