Possible Duplicate:
What does map(&:name) mean in Ruby?
What do you call the &: operator in Ruby?
Just watching some railscast and see code like this:
[Category, Product, Person].each(&:delete_all)
I know that it erases all records for these models, but I can’t find out what this &:delete_all means.
It’s basically shorthand for this:
That is, it sends
delete_allto each element of the iterator.