Here's code, nothing much:
controller:
class LookController < ApplicationController def at @data = params[:text1] end end
and view:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Ruby On Rails</title> </head> <body xml:lang="pl"> <div> Hello <%= @data %>! </div> </body> </html>
and at last, form:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Ruby On Rails</title> </head> <body xml:lang="pl"> <div> <form action="/look/at" method="post"> <div> Input your name:<br /> <input type="text" name="text1" /><br /> <input type="submit" value="Send!" /><br /> </div> </form> </div> </body> </html>
Thanks in advance for any help
This post has been edited by k0b13r: 19 July 2009 - 09:20 AM

New Topic/Question
Reply



MultiQuote



|