Processing array of objects into two strings
You can get by with just two lines:

particulars_string = items.map(&amp;:particular).join("\n")
amounts_string     = items.map(&amp;:amount).join("\n")


Enumerable#map, which is mixed into Array, creates a new array from an existing array by running a block on each element and storing the result. In this case though you don't need a full block, since you just need to call a single method (particular or amount). So it basically extracts those into new arrays and then joins those arrays.

As a rule of thumb, you almost never have to "manually" map stuff from one array to another in Ruby using each and &lt;&lt;. Be sure to read the docs for Array and Enumerable as they're full of good stuff.