Problem with collect() method


#1

hey, i have this code, for making a select list

@geotag = getting the rows from the database.

@geotag_options = [[“All”,"%"]] + @geotag.collect {|g| [g.address1 + ",
" +
g.address2 + ", " + g.floor + “, " + g.city + " (” + g.client.name + “)”
,g.id]}

normal display:
Street 12, Street 13, Bloc A, Ostend (Brutyn N.)

but when the address2 or floor is empty is it displayed:
Street 12, , , Ostend (Brutyn N.)

how can i fix that??

when i use other selecttags i cant select the current value (that from
the
database)

can anyone help me?