diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-18 19:15:17 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-19 17:09:50 +0200 |
commit | 7524d7c0822b9aef962163272874e648ef3bdcff (patch) | |
tree | f193726aa96f41442e7bfd01fcb74bdda224e000 /app/finders | |
parent | 74a6732c0dfc1416cad382203544d9c4d6246f58 (diff) | |
download | gitlab-ce-7524d7c0822b9aef962163272874e648ef3bdcff.tar.gz |
Revert merge request states renaming
Replaced:
* "Accepted" with "Merged"
* "Rejected" with "Closed"
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/issuable_finder.rb | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb index 0bed2115dc7..2eccc0ee31f 100644 --- a/app/finders/issuable_finder.rb +++ b/app/finders/issuable_finder.rb @@ -45,10 +45,10 @@ class IssuableFinder def group return @group if defined?(@group) - @group = + @group = if params[:group_id].present? Group.find(params[:group_id]) - else + else nil end end @@ -56,10 +56,10 @@ class IssuableFinder def project return @project if defined?(@project) - @project = + @project = if params[:project_id].present? Project.find(params[:project_id]) - else + else nil end end @@ -76,7 +76,7 @@ class IssuableFinder return @milestones if defined?(@milestones) @milestones = - if milestones? && params[:milestone_title] != NONE + if milestones? && params[:milestone_title] != NONE Milestone.where(title: params[:milestone_title]) else nil @@ -90,7 +90,7 @@ class IssuableFinder def assignee return @assignee if defined?(@assignee) - @assignee = + @assignee = if assignee? && params[:assignee_id] != NONE User.find(params[:assignee_id]) else @@ -105,7 +105,7 @@ class IssuableFinder def author return @author if defined?(@author) - @author = + @author = if author? && params[:author_id] != NONE User.find(params[:author_id]) else @@ -148,8 +148,6 @@ class IssuableFinder case params[:state] when 'closed' items.closed - when 'rejected' - items.respond_to?(:rejected) ? items.rejected : items.closed when 'merged' items.respond_to?(:merged) ? items.merged : items.closed when 'all' |