Convert string to symbol-able in ruby

Symbols are usually represented as such

:book_author_title

but if I have a string:

"Book Author Title"

is there a built in way in rails/ruby to convert it into a symbol where I can use the : notation without just doing a raw string regex replace?

7 Answers
7

Leave a Comment