diff options
author | Jacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home> | 2016-03-25 08:00:16 -0400 |
---|---|---|
committer | Jacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home> | 2016-03-25 09:54:05 -0400 |
commit | 1cc6d786e4bfd22b5c94dae516ef04c0f32cb379 (patch) | |
tree | 8b3d8d2c4896d37965e81c0834f1c1493678a161 /app/helpers | |
parent | 53a831124e4e704cc494511ed4d04969a223db4e (diff) | |
download | gitlab-ce-1cc6d786e4bfd22b5c94dae516ef04c0f32cb379.tar.gz |
Fix minor code style issues
Fix underscore template error.
Fix `=` spacing
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/issuables_helper.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb index 81df2094392..62050691a39 100644 --- a/app/helpers/issuables_helper.rb +++ b/app/helpers/issuables_helper.rb @@ -16,6 +16,16 @@ module IssuablesHelper base_issuable_scope(issuable).where('iid > ?', issuable.iid).last end + def issuable_json_path(issuable) + project = issuable.project + + if issuable.kind_of?(MergeRequest) + namespace_project_merge_request_path(project.namespace, project, issuable.iid, :json) + else + namespace_project_issue_path(project.namespace, project, issuable.iid, :json) + end + end + def prev_issuable_for(issuable) base_issuable_scope(issuable).where('iid < ?', issuable.iid).first end |