RUBY: Lower case and upper case conversion in ruby on rails

Some of the predefined methods


"Worker".downcase #it returns "worker"
"worker".upcase #it returns "WORKER"
"worker".capitalize # this returns "Worker"


Capitalize function is very similar to the ucfirst() method in php.


No comments:

Post a Comment