Am 13.12.2014 um 17:45 schrieb Bee.Lists:
> Im trying to get my head around the implementation of Ruby forms.

There's no such thing... you mean HTML forms.

> Im messing around in Sinatra and wanted to know how to receive submitted forms.

Use the params hash to access the data, see the example app below.

> Ive looked at CGI and the params tag, but Im unclear as to which one should be used.  
>
> Any urls and insight appreciated as I cant find much out there.

There should be many examples online... for instance the Sinatra
documentation links to apps "In the Wild".

Below a minimal example, save it into a file and run it:

----------
require "sinatra"

get "/" do
  erb :index
end

post "/submit" do
  @first_name = params[:first_name]

  erb :hello
end


__END__

@@layout
<!DOCTYPE html>
<html>
<body>
  <%= yield %>
</body>
</html>


@@index
<form action="/submit" method="post">
  <label for="zahl">First Name:</label>
  <input type="text" name="first_name" value="">
  <input type="submit">
</form>


@@hello
<p>Hello, <%= @first_name %>!</p>

----------

Best regards,
Marcus


-- 
GitHub: https://github.com/stomar/
PGP:    0x6B3A101A