[rails] Conatenating Symbols
[edited: title should be Concatenating Symbols - sorry for the typo]
i'm using the rails form helpers to display a select list.
as i'm sure most know, the form helpers take symbols. it is easy to display a column value in the select list, however, i want to concatenate several columns for display purposes.
this isn't so obvious.
does anyone know how i can concatenate multiple column values with a row so that the symbol used in the form helpers will display it?
ps - i guess i could add another column that contains the concatenated value, but that seems like a less than stellar solution.
Last edited by skeeterbug; Jan 9, 2007 at 01:38.
The form helpers take strings too. So you can just work with strings. Symbols shouldn't be concatenated, because then that would defeat the purpose of using symbols.
Symbols are not strings.
does that mean i can create a variable with the concatenated text value i want and to_s it?
Originally Posted by Majglow
i can't see how else to do it. hard coding one string would only allow that string to be displayed - and there are multiple options depending on user input.
I guess I don't understand what you mean.