From 5ac9a6031fc23cc13651361dcd7e9608b781be05 Mon Sep 17 00:00:00 2001 From: gillianwenhold Date: Tue, 9 Jul 2019 11:53:41 -0400 Subject: [PATCH] Done. --- app.rb | 10 ++++++++++ views/date.erb | 9 +++++++++ views/goodbye.erb | 10 ++++++++++ views/hello.erb | 9 +++++++++ 4 files changed, 38 insertions(+) create mode 100644 views/date.erb create mode 100644 views/goodbye.erb create mode 100644 views/hello.erb diff --git a/app.rb b/app.rb index 254fe3f..a09bf34 100644 --- a/app.rb +++ b/app.rb @@ -4,5 +4,15 @@ class App < Sinatra::Base erb :index end + get '/hello' do + erb :hello + end + get '/goodbye' do + erb :goodbye + end + + get '/date' do + erb :date + end end diff --git a/views/date.erb b/views/date.erb new file mode 100644 index 0000000..9d6e8da --- /dev/null +++ b/views/date.erb @@ -0,0 +1,9 @@ + + + + Date + + +

The date is <%= Date.today.strftime("%A, %B %d, %Y")%>

+ + diff --git a/views/goodbye.erb b/views/goodbye.erb new file mode 100644 index 0000000..ca126f8 --- /dev/null +++ b/views/goodbye.erb @@ -0,0 +1,10 @@ + + + + Goodbye + + + <% name = "Joe" %> +

<%= "Goodbye #{name}"%>

+ + diff --git a/views/hello.erb b/views/hello.erb new file mode 100644 index 0000000..1732194 --- /dev/null +++ b/views/hello.erb @@ -0,0 +1,9 @@ + + + + Hello + + +

Hello World

+ +