Rails Loop Through Comma Delimited String -


i have jquery posting

params[:comment][:attachments] = 09ff86a136c05c82a43fed917e5cdbe9bc44e11a82329c6e923935671ed4bf6b, 840bc6197294c6a8c4393803fa16463d28a2520b33d4a0520e905f8b83399d11 

i want able loop through comma delimited list in rails, here's have far:

params[:comment][:attachments].each |uuid|  uuid end 

problem uuid listing entire string.. ideas loop through comma delimited list in rails?

thanks

params[:comment][:attachments].split(/, ?/).each ... 

Comments

Popular posts from this blog

400 Bad Request on Apache/PHP AddHandler wrapper -

Add email recipient to all new Trac tickets -

php - Change action and image src url's with jQuery -