Ruby, Getting a list count from a Param?
in my Rails 3 app, I have a form that posts XXX,XXXXXXXX What I want to be able to do is something like so:
params[开发者_开发百科:myfield].count
or
params[:myfield].size
But that always returns 1, how can I get a count for the number of items by comma separation?
Thanks
params[:myfield].split(",").size
精彩评论