ilp8ia
Last Updated: February 25, 2016
·
443
· polimorfico
0cd354123bc9e80ca295e2c6457af17d

Get class name from string

Sometime you need to convert a simple string into a class name...

x = 'invoices'
# => 'invoices'
x.classify.constantize
# => Invoice

Happy coding!

Say Thanks
Respond