summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-02-18 12:27:02 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-02-18 12:27:02 +0200
commitddbe978041753d7851780165f8c6c66865570862 (patch)
treee063ebab3b86a4a60b2b7b7f6a3981c303c2e99b /app
parent87a449f264684551d0b9cdfa9ed2d32f21110adb (diff)
downloadgitlab-ce-ddbe978041753d7851780165f8c6c66865570862.tar.gz
Complete api files CRUD
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
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..9f7bc78355e 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 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)