I’m trying to get my head around the implementation of Ruby forms. This is not Rails. I’m messing around in Sinatra and wanted to know how to receive submitted forms. I’ve looked at CGI and the params tag, but I’m unclear as to which one should be used.
Any urls and insight appreciated as I can’t find much out there. I’m confused between the two applications and I can’t seem to get params to work properly.
Thread name: "Ruby & Forms"
Mail number: 1
In reply to: Bee.Lists
···
Date: Sat, Dec 13, 2014
Hi folks.
I’m trying to get my head around the implementation of Ruby forms. This is not Rails. I’m messing around in Sinatra and wanted to know how to receive submitted forms. I’ve looked at CGI and the params tag, but I’m unclear as to which one should be used.
Any urls and insight appreciated as I can’t find much out there. I’m confused between the two applications and I can’t seem to get params to work properly.
I’m trying to get my head around the implementation of Ruby forms. This is not Rails. I’m messing around in Sinatra and wanted to know how to receive submitted forms. I’ve looked at CGI and the params tag, but I’m unclear as to which one should be used.
Any urls and insight appreciated as I can’t find much out there. I’m confused between the two applications and I can’t seem to get params to work properly.
I’m building a small app using Sinatra. Here you can see the routes[1] and the views[2].
The “routes" are composed of two ‘paths’ the ‘get’ and the ‘post’ which ‘redirects’ depending on the situation.
The “views” are made using HAML which is a syntax-sugar for HTML like ERB, LESS, etc. I’m using CSS but you could use SASS instead if you like it...
Does Ruby qua Ruby even have a concept of HTML forms? It seems like
that'd be something that would exist only in the context of
Ruby+RailsOrSinatra. I think that for someone to answer your question,
they'd have to understand Sinatra's form handling, rather than Ruby's.
···
On Sat, Dec 13, 2014 at 10:42 AM, Panagiotis Atmatzidis <atma@convalesco.org> wrote:
Hello,
On 13 Dec 2014, at 18:31, Bee.Lists <bee.lists@gmail.com> wrote:
Hi folks.
I’m trying to get my head around the implementation of Ruby forms. This is
not Rails. I’m messing around in Sinatra and wanted to know how to receive
submitted forms. I’ve looked at CGI and the params tag, but I’m unclear as
to which one should be used.
Any urls and insight appreciated as I can’t find much out there. I’m
confused between the two applications and I can’t seem to get params to work
properly.
I’m building a small app using Sinatra. Here you can see the routes[1] and
the views[2].
The “routes" are composed of two ‘paths’ the ‘get’ and the ‘post’ which
‘redirects’ depending on the situation.
The “views” are made using HAML which is a syntax-sugar for HTML like ERB,
LESS, etc. I’m using CSS but you could use SASS instead if you like it...
Yeah the whole Sinatra thing I have working. It’s the submission of forms which got me. I’m reading about ARGV and params, and I was having trouble getting around the latter. I will be taking a look at your Ruby though. It seems you’re just searching through params, so that’s essentially what I was looking for. I need more testing.
Cheers
···
On Dec 13, 2014, at 1:42 PM, Panagiotis Atmatzidis <atma@convalesco.org> wrote:
I’m building a small app using Sinatra. Here you can see the routes[1] and the views[2].
The “routes" are composed of two ‘paths’ the ‘get’ and the ‘post’ which ‘redirects’ depending on the situation.
The “views” are made using HAML which is a syntax-sugar for HTML like ERB, LESS, etc. I’m using CSS but you could use SASS instead if you like it...