Skip to content

Instantly share code, notes, and snippets.

@diego-aslz
Created September 9, 2013 17:55
Show Gist options
  • Select an option

  • Save diego-aslz/6499149 to your computer and use it in GitHub Desktop.

Select an option

Save diego-aslz/6499149 to your computer and use it in GitHub Desktop.
How does the `&:name` parameter work?
cities = City.all
cities.map(&:name) # ['City 1', 'City 2']
@caarlos0
Copy link

caarlos0 commented Sep 9, 2013

Nice! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment