with a string like : subpart.content_type = "video/mp4; name=tom1- short.mp4" is there anyway to avoid a loop in checking if this string contains one of the extension in an array ['mp4', 'm4v', 'mov']
something like : subpart.content_type.include_one_of_them? ['mp4', 'm4v', 'mov'] thanks for you suggestions erwin I can make it work but I have to write a loop -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.