-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.rb
More file actions
51 lines (40 loc) · 698 Bytes
/
app.rb
File metadata and controls
51 lines (40 loc) · 698 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# myapp.rb
require 'rubygems'
require 'sinatra'
configure do
set :views, "#{File.dirname(__FILE__)}/views"
end
get '/' do
now = Date.today()
wedding = Date.civil(2009, 6, 6)
days_left = wedding-now
if (days_left == 0)
@days_left = "Today's The Day!"
elsif (days_left < 0)
@days_left = "We're Married!!"
else
@days_left = "only #{days_left} days left"
end
haml :index
end
get '/directions' do
haml :directions
end
get '/hotel' do
haml :hotel
end
get '/attendants' do
haml :attendants
end
get '/activities' do
haml :activities
end
get '/photos' do
haml :photos
end
get '/registry' do
haml :registry
end
get '/contact' do
haml :contact
end