I found this code in a RailsCast:
def tag_names @tag_names || tags.map(&:name).join(\' \') end
What does the (&:name)
(&:name)
It's shorthand for tags.map { |tag| tag.name }.join(' ')
tags.map { |tag| tag.name }.join(' ')