-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathapplication.rb
More file actions
52 lines (42 loc) · 982 Bytes
/
Copy pathapplication.rb
File metadata and controls
52 lines (42 loc) · 982 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
52
class ApplicationController < ActionController::Base
include AuthenticatedSystem
layout 'xhtml'
# static named routes
def index
render :action => 'index'
end
def show_services
@title = 'services'
render :action => 'services'
end
def show_about
@title = 'about'
render :action => 'about'
end
def show_support
@title = 'support'
render :action => 'support'
end
def show_contact
@title = 'contact'
render :action => 'contact'
end
def show_eula
@title = 'eula'
render :action => 'eula'
end
def error
render :action => 'error'
end
protected
def check_authorization
unless logged_in?
flash[:notice] = 'Sorry, but you need to log in first!'
session[:redirect_url] = request.request_uri
redirect_to '/'
end
end
def check_for_https
# this method should check the existing protocol and redirect to https if it's not already
end
end