Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
685681e2
Commit
685681e2
authored
Mar 31, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove Tree/Commit decorator usage from controllers
parent
2a6b4f96
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
10 deletions
+0
-10
app/controllers/commits_controller.rb
app/controllers/commits_controller.rb
+0
-2
app/controllers/compare_controller.rb
app/controllers/compare_controller.rb
+0
-2
app/controllers/merge_requests_controller.rb
app/controllers/merge_requests_controller.rb
+0
-3
app/controllers/refs_controller.rb
app/controllers/refs_controller.rb
+0
-3
No files found.
app/controllers/commits_controller.rb
View file @
685681e2
...
...
@@ -13,8 +13,6 @@ class CommitsController < ProjectResourceController
@limit
,
@offset
=
(
params
[
:limit
]
||
40
),
(
params
[
:offset
]
||
0
)
@commits
=
@repo
.
commits
(
@ref
,
@path
,
@limit
,
@offset
)
@commits
=
Commit
.
decorate
(
@commits
)
@commits
=
CommitDecorator
.
decorate_collection
(
@commits
)
respond_to
do
|
format
|
format
.
html
# index.html.erb
...
...
app/controllers/compare_controller.rb
View file @
685681e2
...
...
@@ -15,8 +15,6 @@ class CompareController < ProjectResourceController
@diffs
=
result
[
:diffs
]
@refs_are_same
=
result
[
:same
]
@line_notes
=
[]
@commits
=
CommitDecorator
.
decorate_collection
(
@commits
)
end
def
create
...
...
app/controllers/merge_requests_controller.rb
View file @
685681e2
...
...
@@ -94,12 +94,10 @@ class MergeRequestsController < ProjectResourceController
def
branch_from
@commit
=
@repository
.
commit
(
params
[
:ref
])
@commit
=
CommitDecorator
.
decorate
(
@commit
)
end
def
branch_to
@commit
=
@repository
.
commit
(
params
[
:ref
])
@commit
=
CommitDecorator
.
decorate
(
@commit
)
end
def
ci_status
...
...
@@ -143,7 +141,6 @@ class MergeRequestsController < ProjectResourceController
# Get commits from repository
# or from cache if already merged
@commits
=
@merge_request
.
commits
@commits
=
CommitDecorator
.
decorate_collection
(
@commits
)
@allowed_to_merge
=
allowed_to_merge?
@show_merge_controls
=
@merge_request
.
opened?
&&
@commits
.
any?
&&
@allowed_to_merge
...
...
app/controllers/refs_controller.rb
View file @
685681e2
...
...
@@ -34,7 +34,6 @@ class RefsController < ProjectResourceController
@logs
=
contents
.
map
do
|
content
|
file
=
params
[
:path
]
?
File
.
join
(
params
[
:path
],
content
.
name
)
:
content
.
name
last_commit
=
@repo
.
commits
(
@commit
.
id
,
file
,
1
).
last
last_commit
=
CommitDecorator
.
decorate
(
last_commit
)
{
file_name:
content
.
name
,
commit:
last_commit
...
...
@@ -49,9 +48,7 @@ class RefsController < ProjectResourceController
@repo
=
project
.
repository
@commit
=
@repo
.
commit
(
@ref
)
@commit
=
CommitDecorator
.
decorate
(
@commit
)
@tree
=
Tree
.
new
(
@commit
.
tree
,
@ref
,
params
[
:path
])
@tree
=
TreeDecorator
.
new
(
@tree
)
@hex_path
=
Digest
::
SHA1
.
hexdigest
(
params
[
:path
]
||
""
)
if
params
[
:path
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment