23 Jul 07:34
Re: Extracting one column from an array of objects
From: Danny Burkes <rails-mailing-list@...>
Subject: Re: Extracting one column from an array of objects
Newsgroups: gmane.comp.lang.ruby.rails
Date: 2008-07-23 05:34:02 GMT
Subject: Re: Extracting one column from an array of objects
Newsgroups: gmane.comp.lang.ruby.rails
Date: 2008-07-23 05:34:02 GMT
> Say I have an array of Users which has a column called 'id'. I need an > array that holds just the ids. ids = users.collect(&:id) -- -- 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@... To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@... For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
RSS Feed