Instead of writing this
Profile.find(:all).collect{ |x| x.email }
I could write this using Rails’ Symbol#to_proc
Profile.find(:all).collect(&:email)
Nice.
Instead of writing this
Profile.find(:all).collect{ |x| x.email }
I could write this using Rails’ Symbol#to_proc
Profile.find(:all).collect(&:email)
Nice.