summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-02-18 14:15:40 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-02-18 14:15:40 +0000
commit8686d09d3e9e53089f7d3f11d74f0368f76a2aa2 (patch)
tree9702483393e25eabd403b98d3af2de0a0e0cc75a /app
parent8a55636f8974d73c097a52721e2208cea727bc17 (diff)
parent6cf39fe10ddf6f90a17d52ba6b50425f58215eeb (diff)
downloadgitlab-ce-8686d09d3e9e53089f7d3f11d74f0368f76a2aa2.tar.gz
Merge branch 'feature/api_fle_encoded' into 'master'
Complete api files CRUD Adds ability to read file from repository with content encoded with Base64.
Diffstat (limited to 'app')
-rw-r--r--app/models/repository.rb12
-rw-r--r--app/views/help/_api_layout.html.haml2
2 files changed, 7 insertions, 7 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index 2c2bf242b94..99d908b5d81 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -180,13 +180,13 @@ class Repository
end
def blob_at_branch(branch_name, path)
- last_commit = commit(branch_name)
+ last_commit = commit(branch_name)
- if last_commit
- blob_at(last_commit.sha, path)
- else
- nil
- end
+ if last_commit
+ blob_at(last_commit.sha, path)
+ else
+ nil
+ end
end
# Returns url for submodule
diff --git a/app/views/help/_api_layout.html.haml b/app/views/help/_api_layout.html.haml
index c211b658410..af723f906d9 100644
--- a/app/views/help/_api_layout.html.haml
+++ b/app/views/help/_api_layout.html.haml
@@ -5,7 +5,7 @@
%i.icon-angle-left
Back to help
%ul.nav.nav-pills.nav-stacked
- - %w(README projects project_snippets repositories deploy_keys users groups session issues milestones merge_requests notes system_hooks).each do |file|
+ - %w(README projects project_snippets repositories repository_files commits deploy_keys users groups session issues milestones merge_requests notes system_hooks).each do |file|
%li{class: file == @category ? 'active' : nil}
= link_to file.titleize, help_api_file_path(file)