Created
December 28, 2010 08:14
-
-
Save manveru/757042 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'ramaze' | |
class Main < Ramaze::Controller | |
layout :html5 | |
def index | |
%q( | |
<form method="post" action="#{r :result}"> | |
<input type="text" name="foo"> | |
<input type="submit"> | |
</form> | |
) | |
end | |
def result | |
@foo = request[:foo] | |
%q(foo is: #{@foo}) | |
end | |
def html5 | |
%q( | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Form</title> | |
</head> | |
<body> | |
#{@content} | |
</body> | |
</html> | |
) | |
end | |
end | |
Ramaze.start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment