wikipages_controller.rb
1.21 KB
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
# Author - Igor Portela - igorportela.com | Copyright(c) 2013. All rights reserved.
#
# Author Igor Amorim - www.igoramorim.com
#
class Wikilibras::WikipagesController < Wikilibras::BaseController
helper :all
def index
#add_breadcrumb "Wikilibras", index_path
if params[:nome_sinal].present?
render :second
end
end
def second
#add_breadcrumb "Configurar Sinal", second_path
end
def generate
@wikivideo = Wikivideo.new
# raise params.inspect
if(params[:tipo_movimento] == "pontual")
@wikivideo = @wikivideo.punctual_rules(params, current_user.id)
redirect_to wikilibras_wikivideo_path(@wikivideo)
end
if(params[:tipo_movimento] == "circular")
@wikivideo = @wikivideo.circular_rules(params, current_user.id)
redirect_to wikilibras_wikivideo_path(@wikivideo)
end
if(params[:tipo_movimento] == "semicircular")
@wikivideo = @wikivideo.semicircular_rules(params, current_user.id)
redirect_to wikilibras_wikivideo_path(@wikivideo)
end
if(params[:tipo_movimento] == "retilineo")
@wikivideo = @wikivideo.rectilinear_rules(params, current_user.id)
redirect_to wikilibras_wikivideo_path(@wikivideo)
end
end
end