Julian,

Have you done any benchmark testing on using the &: method? I would be 
curious as to why you say it's slower.

As for uglier - I think that's a personal preference. I personally would 
never recommend chaining 3 methods together as you did for fear that one 
would fail causing the infamous "undefined method ... for nil". To my 
eyes, the map.(&:email) is very clean and easy to read without a bunch 
of nasty |v| v.email, etc.

I would be curious about performance tests though since you say it's 
slower. I haven't noticed any major performance hit, but I've never 
really tested.

-- Josh
http://iammrjoshua.com


Julian Leviston wrote:
> Actually it MUST if you're doing not null queries. <> won't work for
> null
> 
> Blog: http://random8.zenunit.com/
> Learn rails: http://sensei.zenunit.com/

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to