Forum: Ruby on Rails Comparing two hashes

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
47632046c1a5dbaf00472e2241fbee0d?d=identicon&s=25 David Smalley (Guest)
on 2006-02-18 19:42
(Received via mailing list)
Ok, I'm trying to do an implementation of a blog client using rails.
I'm using a nice pre-built ruby module called "blog/client" - http://
raa.ruby-lang.org/project/blogclient/ - which has some nice methods
that wrap up XMLRPC/client calls and make the manipulation of structs
transparent to the main application.

My next task is to try and fetch the list of categories in use on the
blog using the - mt_getCategoryList(@metaBlogId) - method. This
returns a hash that I can read the contents out of with categories
['categoryName']. Now, I want to assign this names of categories
taken from the hash to check boxes on posts that are being edited.

This requires a second XML call to - mt_getPostCategories
(@post.postid) - that gets the categories already set on a particular
post (identified by @post.postid).

What needs to be done next is display the result of getCategoryList
as check boxes, and check any boxes where they match the hash
returned by mt_getPostCategories.

I'm thinking I need to create a new hash with ['categoryName'] and
['checked'], but I really am stuck so thats probably totally incorrect!

I'm not sure I explained that very well!

Any other good ideas?

David
This topic is locked and can not be replied to.