I found this code in a RailsCast:
def tag_names @tag_names || tags.map(&:name).join(\' \') end
What does the (&:name)
(&:name)
It is same as below:
def tag_names if @tag_names @tag_names else tags.map{ |t| t.name }.join(' ') end