diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-02-18 12:27:02 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-02-18 12:27:02 +0200 |
commit | ddbe978041753d7851780165f8c6c66865570862 (patch) | |
tree | e063ebab3b86a4a60b2b7b7f6a3981c303c2e99b /app | |
parent | 87a449f264684551d0b9cdfa9ed2d32f21110adb (diff) | |
download | gitlab-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.rb | 12 | ||||
-rw-r--r-- | app/views/help/_api_layout.html.haml | 2 |
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) |