Skip to content

Instantly share code, notes, and snippets.

@manveru
Created December 28, 2010 08:14
Show Gist options
  • Save manveru/757042 to your computer and use it in GitHub Desktop.
Save manveru/757042 to your computer and use it in GitHub Desktop.
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