aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2015-12-07 23:52:37 -0500
committerTeddy Wing2015-12-07 23:52:37 -0500
commita97356418336c04e2c93a5107ee9ec2f2d07f5d5 (patch)
tree7dcb1841a9778fb245fded47d9934a77899acf14
parent2960922872c43c9fa9a7950687c5833820a9da64 (diff)
downloadRuby-Web-Sessions-Exercise-a97356418336c04e2c93a5107ee9ec2f2d07f5d5.tar.bz2
Render index template
Instead of responding with "Hello World", render a full ERB template so we can display HTML with form fields.
-rw-r--r--app.rb2
-rw-r--r--views/index.erb10
2 files changed, 11 insertions, 1 deletions
diff --git a/app.rb b/app.rb
index 6f61f5b..8e51fee 100644
--- a/app.rb
+++ b/app.rb
@@ -3,6 +3,6 @@ require 'sinatra/base'
class App < Sinatra::Base
get '/' do
- 'Hello World'
+ erb :index
end
end
diff --git a/views/index.erb b/views/index.erb
new file mode 100644
index 0000000..c4365a5
--- /dev/null
+++ b/views/index.erb
@@ -0,0 +1,10 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Ruby Session Exercise</title>
+</head>
+<body>
+ <h1>Login</h1>
+</body>
+</html>