diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-23 18:56:05 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-23 18:56:05 +0000 |
commit | e55e23bbda6f6a95982109bc46e48a5550e4c181 (patch) | |
tree | f2509fed4c77fbbfdc43492d7bf7194bff3a69cb /app/controllers/projects/commits_controller.rb | |
parent | 95791316f4037273af7b747ce1851d5f4e46933f (diff) | |
parent | 40bca5246b6e1cea36932c5e0eae89a63d8f0a03 (diff) | |
download | gitlab-ce-e55e23bbda6f6a95982109bc46e48a5550e4c181.tar.gz |
Merge branch 'refactor/projects_controllers' of /home/git/repositories/gitlab/gitlabhq into 6-0-dev
Diffstat (limited to 'app/controllers/projects/commits_controller.rb')
-rw-r--r-- | app/controllers/projects/commits_controller.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/app/controllers/projects/commits_controller.rb b/app/controllers/projects/commits_controller.rb new file mode 100644 index 00000000000..bdffc940ea5 --- /dev/null +++ b/app/controllers/projects/commits_controller.rb @@ -0,0 +1,23 @@ +require "base64" + +class Projects::CommitsController < Projects::ApplicationController + include ExtractsPath + + # Authorize + before_filter :authorize_read_project! + before_filter :authorize_code_access! + before_filter :require_non_empty_project + + def show + @repo = @project.repository + @limit, @offset = (params[:limit] || 40), (params[:offset] || 0) + + @commits = @repo.commits(@ref, @path, @limit, @offset) + + respond_to do |format| + format.html # index.html.erb + format.js + format.atom { render layout: false } + end + end +end |