summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-07-27 21:23:35 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-07-27 21:23:35 +0300
commita7fab42b9cd34ddd44ff2ab0837691f57428b8e4 (patch)
tree29f27bf6ccdf6edbe71cf190034dac400ebb4e92 /app/controllers
parentcb86cf844c4abddba6e5d5e43cebd3297d724897 (diff)
downloadgitlab-ce-a7fab42b9cd34ddd44ff2ab0837691f57428b8e4.tar.gz
Public area: Project#show page prototype
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/public/projects_controller.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/public/projects_controller.rb b/app/controllers/public/projects_controller.rb
index 6c0b397b4c3..5d830de6287 100644
--- a/app/controllers/public/projects_controller.rb
+++ b/app/controllers/public/projects_controller.rb
@@ -10,4 +10,12 @@ class Public::ProjectsController < ApplicationController
@projects = @projects.search(params[:search]) if params[:search].present?
@projects = @projects.includes(:namespace).order("namespaces.path, projects.name ASC").page(params[:page]).per(20)
end
+
+ def show
+ @project = Project.public_only.find_with_namespace(params[:id])
+ render_404 and return unless @project
+
+ @repository = @project.repository
+ @recent_tags = @repository.tags.first(10)
+ end
end