Concatenating two fields in a collect <p>Rails 2.3.5</p> <p>I'm not having any luck searching for an answer on this. I know I could just write out a manual sql statement with a concat in it, but I thought I'd ask:</p> <p>To load a select, I'm running a query of shift records. I'm trying to make the value in the select be shift date followed by a space and then the shift name. I can't figure out the syntax for doing a concat of two fields in a collect. The Ruby docs make it looks like plus signs and double quotes should work in a collect but everything I try gets a "expected numeric" error from Rails.</p> <pre><code> @shift_list = [a find query].collect{|s| [s.shift_date + " " + s.shift_name, s.id]} </code></pre> <p>Thanks for any help - much appreciated.</p>