Michael Pavling wrote in post #970778:
> On 26 December 2010 14:30, Marnen Laibow-Koser <lists@ruby-forum.com>
> wrote:
>> ivanpoval wrote in post #970734:
>>> With ActiveSupport from Rails it's also possible:
>>> @providers = @authentications.map(&:provider)
>>
>> However, this is slightly slower, so while I use it in tests, I tend not
>> to use it in application code.
>
> But it's much faster to type, and easy to read.... you're not
> prematurely optimising, are you? ;-)
When a premature optimization is this simple, and this free of
disadvantages, there's no reason not do to it. Any more complex and I
wouldn't. :)
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen@marnen.org
Sent from my iPhone
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment