I want to make an array out of the difference of two different arrays
I have an array of users who own a page
I want the array of the users who do not own the page
@page.users = [kim, bob, sue]
@users = User.find(:all) = [kim, bob, sue, joe, jim]
then I want the difference between the two
@not_page_users = [joe, jim]
Would you believe?:
@not_page_users = @users - @page.users
Here's an example of where I think it would be really beneficial for those people coming to Rails without a lot of Ruby experience to either pick up a copy of the Pickaxe book or browse the contents of www.ruby-doc.org.
If you go to ruby-doc.org, click on "core library" and click on "Array", you will be amazed at how many awesome methods Ruby already has that make stuff like this so easy.
Hope I didn't come across as lecturing you (or anyone else). I just would hate to see Rails users who don't know much Ruby miss out on using the power of such an awesome programming language.