I am using Ruby on Rails 3 and I am trying an joinarray with a symbol &. I read the Ruby documentation about this .
My array:
["name1", "name2"]
If i do
["name1", "name2"].join("&")
this is the result as
name1&name2
I would like these results to be
&name1&name2
Decision
["", "name1", "name2"].join("&")
but I think this is not the "right way".
So how can I &name1&name2not use ["", "name1", "name2"].join("&")?
source
share