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
|
# File 'app/controllers/mystro_volley/home_controller.rb', line 14
def show
p = params[:project]
b = params[:branch]
v = params[:version]
if p
@project = MystroVolley::Project.where(name: p).first
if @project
if b
@branch = @project.branches.where(name: b).first
if @branch
if v
@version = @branch.versions.where(name: v).first
if @version
return render "mystro_volley/versions/show"
else
flash.now[:error] = "version #{v} not found"
return render "mystro_volley/branches/show"
end
else
return render "mystro_volley/branches/show"
end
else
flash.now[:error] = "branch #{b} not found"
return render "mystro_volley/projects/show"
end
else
return render "mystro_volley/projects/show"
end
else
flash.now[:error] = "project #{p} not found"
end
else
@myversions = MystroVolley::Version.desc(:timestamp).where(latest: true)
render "mystro_volley/versions/index"
end
end
|