diff options
author | Phil Hughes <me@iamphill.com> | 2017-04-26 13:32:21 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-04-26 14:23:29 +0300 |
commit | 480fcb5533e59151a6e9ae11baef59ebab64cc6c (patch) | |
tree | 2c5684dc86ad8ba1a4d96c014843e83cc6492e93 /app/controllers/concerns/milestone_actions.rb | |
parent | 45e5d12122ac04d7558c84e47003fc8c85a9dddd (diff) |
Added controller specs
Diffstat (limited to 'app/controllers/concerns/milestone_actions.rb')
-rw-r--r-- | app/controllers/concerns/milestone_actions.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/controllers/concerns/milestone_actions.rb b/app/controllers/concerns/milestone_actions.rb index c28d08201e0..2cc7e15c27d 100644 --- a/app/controllers/concerns/milestone_actions.rb +++ b/app/controllers/concerns/milestone_actions.rb @@ -3,6 +3,7 @@ module MilestoneActions def merge_requests respond_to do |format| + format.html { redirect_to milestone_path } format.json do render json: tabs_json("shared/milestones/_merge_requests_tab", { merge_requests: @milestone.merge_requests, @@ -14,6 +15,7 @@ module MilestoneActions def participants respond_to do |format| + format.html { redirect_to milestone_path } format.json do render json: tabs_json("shared/milestones/_participants_tab", { users: @milestone.participants @@ -24,6 +26,7 @@ module MilestoneActions def labels respond_to do |format| + format.html { redirect_to milestone_path } format.json do render json: tabs_json("shared/milestones/_labels_tab", { labels: @milestone.labels @@ -39,4 +42,12 @@ module MilestoneActions html: view_to_html_string(partial, data) } end + + def milestone_path + if @project + namespace_project_milestone_path(@project.namespace, @project, @milestone) + else + group_milestone_path(@group, @milestone.safe_title, title: @milestone.title) + end + end end |