Rails Tip #01 ===> Symbol to Proc

in rails •  7 years ago 

The Task

Get all the users from Database
Get only the names
Get them all in upCase

 User.all.collect(&:name).collect(&:upcase)

Screenshot from 2018-04-20 10-21-04.png

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Subhanallah very nice my friend