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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
836c870c
Commit
836c870c
authored
Oct 01, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix edit file
parent
ae9dd627
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
app/controllers/projects/edit_tree_controller.rb
app/controllers/projects/edit_tree_controller.rb
+2
-2
No files found.
app/controllers/projects/edit_tree_controller.rb
View file @
836c870c
...
@@ -32,9 +32,9 @@ class Projects::EditTreeController < Projects::ApplicationController
...
@@ -32,9 +32,9 @@ class Projects::EditTreeController < Projects::ApplicationController
private
private
def
edit_requirements
def
edit_requirements
@blob
=
Gitlab
::
Git
::
Blob
.
new
(
@repository
,
@commit
.
id
,
@ref
,
@path
)
@blob
=
Gitlab
::
Git
::
Blob
.
find
(
@repository
,
@commit
.
id
,
@path
)
unless
@blob
.
exists?
&&
@blob
.
text?
unless
@blob
redirect_to
project_blob_path
(
@project
,
@id
),
notice:
"You can only edit text files"
redirect_to
project_blob_path
(
@project
,
@id
),
notice:
"You can only edit text files"
end
end
...
...
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