Commit 685681e28af2cae7c5ba208130ad5b6b4e5c4ed9
1 parent
2a6b4f96
Exists in
master
and in
4 other branches
remove Tree/Commit decorator usage from controllers
Showing
4 changed files
with
0 additions
and
10 deletions
Show diff stats
app/controllers/commits_controller.rb
... | ... | @@ -13,8 +13,6 @@ class CommitsController < ProjectResourceController |
13 | 13 | @limit, @offset = (params[:limit] || 40), (params[:offset] || 0) |
14 | 14 | |
15 | 15 | @commits = @repo.commits(@ref, @path, @limit, @offset) |
16 | - @commits = Commit.decorate(@commits) | |
17 | - @commits = CommitDecorator.decorate_collection(@commits) | |
18 | 16 | |
19 | 17 | respond_to do |format| |
20 | 18 | format.html # index.html.erb | ... | ... |
app/controllers/compare_controller.rb
app/controllers/merge_requests_controller.rb
... | ... | @@ -94,12 +94,10 @@ class MergeRequestsController < ProjectResourceController |
94 | 94 | |
95 | 95 | def branch_from |
96 | 96 | @commit = @repository.commit(params[:ref]) |
97 | - @commit = CommitDecorator.decorate(@commit) | |
98 | 97 | end |
99 | 98 | |
100 | 99 | def branch_to |
101 | 100 | @commit = @repository.commit(params[:ref]) |
102 | - @commit = CommitDecorator.decorate(@commit) | |
103 | 101 | end |
104 | 102 | |
105 | 103 | def ci_status |
... | ... | @@ -143,7 +141,6 @@ class MergeRequestsController < ProjectResourceController |
143 | 141 | # Get commits from repository |
144 | 142 | # or from cache if already merged |
145 | 143 | @commits = @merge_request.commits |
146 | - @commits = CommitDecorator.decorate_collection(@commits) | |
147 | 144 | |
148 | 145 | @allowed_to_merge = allowed_to_merge? |
149 | 146 | @show_merge_controls = @merge_request.opened? && @commits.any? && @allowed_to_merge | ... | ... |
app/controllers/refs_controller.rb
... | ... | @@ -34,7 +34,6 @@ class RefsController < ProjectResourceController |
34 | 34 | @logs = contents.map do |content| |
35 | 35 | file = params[:path] ? File.join(params[:path], content.name) : content.name |
36 | 36 | last_commit = @repo.commits(@commit.id, file, 1).last |
37 | - last_commit = CommitDecorator.decorate(last_commit) | |
38 | 37 | { |
39 | 38 | file_name: content.name, |
40 | 39 | commit: last_commit |
... | ... | @@ -49,9 +48,7 @@ class RefsController < ProjectResourceController |
49 | 48 | |
50 | 49 | @repo = project.repository |
51 | 50 | @commit = @repo.commit(@ref) |
52 | - @commit = CommitDecorator.decorate(@commit) | |
53 | 51 | @tree = Tree.new(@commit.tree, @ref, params[:path]) |
54 | - @tree = TreeDecorator.new(@tree) | |
55 | 52 | @hex_path = Digest::SHA1.hexdigest(params[:path] || "") |
56 | 53 | |
57 | 54 | if params[:path] | ... | ... |