On 24 November 2011 07:01, Hesham <[email protected]> wrote:
> I'm using the act_as_followers gem and one of the methods returns an
> array of all the users that are following a specific user, example:
>
> followers = user.all_following
>
> What would be the clean way of extracting just the followers.id and
> placing the results in an array?

Have a look through the documentation for the Array class, map or
collect may well be useful.

Probably working through a ruby book would also be a good idea, have a
look at the Pickaxe book.  You cannot use rails without a good
knowledge of Ruby.

Colin

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to