Commit efa267602122dc2aa5ee789a87fe4039c7ffe484
1 parent
a7fab42b
Exists in
master
and in
4 other branches
Render readme file in public project#show
Showing
4 changed files
with
10 additions
and
3 deletions
Show diff stats
app/controllers/public/projects_controller.rb
@@ -17,5 +17,8 @@ class Public::ProjectsController < ApplicationController | @@ -17,5 +17,8 @@ class Public::ProjectsController < ApplicationController | ||
17 | 17 | ||
18 | @repository = @project.repository | 18 | @repository = @project.repository |
19 | @recent_tags = @repository.tags.first(10) | 19 | @recent_tags = @repository.tags.first(10) |
20 | + | ||
21 | + @commit = @repository.commit(params[:ref]) | ||
22 | + @tree = Tree.new(@repository, @commit.id, @ref, @path) | ||
20 | end | 23 | end |
21 | end | 24 | end |
app/views/layouts/errors.html.haml
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | %html{ lang: "en"} | 2 | %html{ lang: "en"} |
3 | = render "layouts/head", title: "Error" | 3 | = render "layouts/head", title: "Error" |
4 | %body{class: "#{app_theme} application"} | 4 | %body{class: "#{app_theme} application"} |
5 | - = render "layouts/head_panel", title: "" | 5 | + = render "layouts/head_panel", title: "" if current_user |
6 | = render "layouts/flash" | 6 | = render "layouts/flash" |
7 | .container | 7 | .container |
8 | .content | 8 | .content |
app/views/public/projects/show.html.haml