Create class names from strings

Posted . Visible to the public.
"foo_and_bars".classify                      # => "FooAndBar" #String
"foo_and_bars".classify.constantize    # => "FooAndBar" #Class

# in case of singular names
"business".classify                             # => "Busines"
"business".camelize                           # => "Business"
"business".camelize.constantize         #=> "Business" #Class     
Sandheep
Posted by Sandheep to Sandheep's deck (2013-05-20 09:08)