[Rails] checking form submission

Max Benjamin
Tue, 01 Aug 2006 20:50:56 -0000

I''m working on a rails app where some of the content is located in
"static" rhtml files.  How should I access form parameters in these
files so that something like the following will work(simply checking
whether a form has been submitted):

<%
require ''cgi''
cgi = CGI.new

if cgi[''myquery_input_submit''] == ''1''
  test = 1
else
  test = ''none''
end
%>
<%= test %>
<%= ''my input'' +
cgi[''myquery_input_submit''].to_s%>
<form action="http://127.0.0.1/~josephmoore/testForm.rhtml"
method="post" accept-charset="utf-8">

		<textarea name="myquery" rows="8"
cols="40">


		<input type="hidden" name="myquery_input_submit"
value="1" />



Thanks

--
Posted via http://www.ruby-forum.com/.