Possible Duplicate:
Ruby/Ruby on Rails ampersand colon shortcut
Seen in Railscast #167 :
def tag_names
@tag_names || tags.map(&:name).join(' ')
end
What is this &:name
syntax, what does it do ?
I understand what a symbol is, but what other kinds of objects this &
can be prepended to ?
Duplicate question : http://stackoverflow.com/questions/1961030/ruby-ruby-on-rails-ampersand-colon-shortcut