concatenate columns from a database to one string?

That fourth parameter (where you have ":name") just specifies a method to call on your object. So you can put any method in there, not just a database attribute.

In other words, you could have the following method in your mode:

def summary   "#{}: #{}" end

and then pass :summary to the collection_select method, and it'll use the values returned by that method to populate your options tags.


Whoops, I mis-counted -- I think it's actually the fifth parameter!