Check if two strings are anagrams [Ruby on Rails]