forked from publiclab/plots2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
legacy_controller.rb
61 lines (49 loc) · 1.31 KB
/
legacy_controller.rb
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
53
54
55
56
57
58
59
60
61
class LegacyController < ApplicationController
def notes
if params[:id]
redirect_to URI.parse('/tag/' + params[:id]).path, status: 301
else
redirect_to '/research', status: 301
end
end
def note_add
redirect_to '/post', status: 301
end
def page_add
redirect_to '/wiki/new', status: 301
end
def people
redirect_to URI.parse('/profile/' + params[:id]).path, status: 301
end
def place
redirect_to URI.parse('/wiki/' + params[:id]).path, status: 301
end
def tool
redirect_to URI.parse('/wiki/' + params[:id]).path, status: 301
end
def openid
user = User.find params[:id]
redirect_to URI.parse('/openid/' + user.username).path, status: 301
end
def openid_username
redirect_to URI.parse('/openid/' + params[:username]).path, status: 301
end
def file
redirect_to URI.parse("//#{request.host}/sites/default/files/" + params[:filename] + '.' + params[:format]).path, status: 301
end
def register
redirect_to '/signup', status: 301
end
# /node/5853
def node
node = Node.find params[:id]
redirect_to URI.parse(node.path).path, status: 301
end
def report
node = Node.find_by(slug: params[:id])
redirect_to URI.parse(node.path).path, status: 301
end
def rss
redirect_to '/feed.rss', status: 301
end
end