From: Robert Klemme Date: 2010-03-11T19:15:57+09:00 Subject: Re: (noob) Help with variables 2010/3/11 James Dewey : > I'm trying to make what amounts to a cloud files manager using the ruby > API. In the end I want login via MySQL and all that fun stuff, but for > now I want it to just -work-. I'm using eruby loaded via CGI on apache. > > So I was able to list the containers on my account: > > <% require 'rubygems' > require 'cloudfiles' > cf = CloudFiles::Connection::new('ryuujinx','APIKEYREMOVED') %> > > > >         >                Cloud Files Manager >         > > > >
>

List of Containers:

> <% > cf::list_containers::each do |listcont| >        puts listcont + "
" > end > %> I believe you rather want <% cf::list_containers::each do |listcont| %> <%= listcont %>
<% end %> > I could make it do it in a select menu with a form, etc, but my problem > is even if I do post it to a new page, I have no idea how to grab the > variables or anything. Not sure what you mean by "grab variables". If you need to evaluate HTML form variables you can use http://www.ruby-doc.org/core/classes/CGI.html > The next step I would want to do is container = > cf::container('SELECTEDCONTAINER') for further manipulation such as the > ability to manage objects inside the container, but I'm kind of lost. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/