Help with gsub

I have a string of state codes (ie 'MD,PA,VA,WV') i'm passing from a
select list (:allow_multiple => true), in which I'm trying to replace
the commas with "','". I have the following gsub, which works fine in
irb, however in Rails it's returning "'',''" (double single-quotes).

states = params[:states].gsub(/,/, "','")

Any suggestions?

In this sort of situation I would use ruby-debug to break into the
code at that point, then you can examine the data in and out of gsub
and possibly get a clue as to what is happening.

Colin