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
Boxiang Sun
gitlab-ce
Commits
9053f8eb
Commit
9053f8eb
authored
Feb 08, 2018
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix specs
parent
b8d7367a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
app/helpers/blob_helper.rb
app/helpers/blob_helper.rb
+4
-4
No files found.
app/helpers/blob_helper.rb
View file @
9053f8eb
...
...
@@ -17,7 +17,7 @@ module BlobHelper
end
def
edit_blob_link
(
project
=
@project
,
ref
=
@ref
,
path
=
@path
,
options
=
{})
return
unless
readable_blob?
(
options
,
path
,
project
,
ref
)
return
unless
blob
=
readable_blob
(
options
,
path
,
project
,
ref
)
common_classes
=
"btn js-edit-blob
#{
options
[
:extra_class
]
}
"
...
...
@@ -45,7 +45,7 @@ module BlobHelper
def
ide_blob_link
(
project
=
@project
,
ref
=
@ref
,
path
=
@path
,
options
=
{})
return
unless
show_new_ide?
return
unless
readable_blob?
(
options
,
path
,
project
,
ref
)
return
unless
blob
=
readable_blob
(
options
,
path
,
project
,
ref
)
common_classes
=
"btn js-edit-ide
#{
options
[
:extra_class
]
}
"
...
...
@@ -304,11 +304,11 @@ module BlobHelper
options
end
def
readable_blob
?
(
options
,
path
,
project
,
ref
)
def
readable_blob
(
options
,
path
,
project
,
ref
)
blob
=
options
.
delete
(
:blob
)
blob
||=
project
.
repository
.
blob_at
(
ref
,
path
)
rescue
nil
blob
&&
blob
.
readable_text?
blob
if
blob
&
.
readable_text?
end
def
edit_blob_fork
(
common_classes
,
options
,
path
,
project
,
ref
)
...
...
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