This is probably a stupid one, but I'm missing something here...
I have this
users = [{name: "chris"}, {name: "john"}]
This works
users.map do |obj|
puts obj[:name]
end
I want to do this
user.map(&:name)
tried the symbol to proc in many different ways with no luck. I can't think of a way to do this that makes sense, but I feel there is one.
users. That allows readers to reference it in comments and answers. All too often the variable is omitted.