Hi,

I wrote pure Ruby code for consuming an existing web service. The
requests are send via net/http and are in XML format. That means I
have Ruby classes that look like this:

class Request
  def initialize(myrequest)
    .....--> send myrequest via net/http to the web service
  end
end

To use that class I have the following code:

f = Request.new("This is a request").xml
p f

Now I want to make a rails web form where I can type my request and
send that to my existing classes to perform the request. All I found
via search were forms that worked with databases. I don't need a
database for that functionality. (I will need it later, when I store
the results, but that comes later!)

I already created a rails project and put my ruby file in the lib
folder. In my controller I have the following:


      f = Request.new("This is a request").xml
      @out = p f

So I am able to get the result of that request in my view via <%=@out
%>, but that is static.

How can I send "This is a request" via a web form from my view to that
ruby file?

I have no clue how to start. Again everything I find about rails is
database stuff.

I really hope that someone can help me here and give a clue how I can
start.

Cheers,
Sebastian

-- 
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