summaryrefslogtreecommitdiff
path: root/app/helpers/issues_helper.rb
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2012-08-16 18:13:22 -0400
committerRobert Speicher <rspeicher@gmail.com>2012-08-16 18:13:22 -0400
commitfeee3838e14c90bc73b97cfa8be3760e52605531 (patch)
treeb92b957ca040df35ea1ec91fb7ab0431b9f7825f /app/helpers/issues_helper.rb
parent5a90d044f7fddf28b4dc3cd541315bce862f2866 (diff)
downloadgitlab-ce-feee3838e14c90bc73b97cfa8be3760e52605531.tar.gz
Combine unassigned_issue and unassigned_milestone into unassigned_filter
Diffstat (limited to 'app/helpers/issues_helper.rb')
-rw-r--r--app/helpers/issues_helper.rb13
1 files changed, 5 insertions, 8 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb
index 452611fefbd..d4d6c2d4205 100644
--- a/app/helpers/issues_helper.rb
+++ b/app/helpers/issues_helper.rb
@@ -37,13 +37,10 @@ module IssuesHelper
@project.issues.tag_counts_on(:labels).map(&:name)
end
- # Returns a fake Milestone-like object that can be used in a
- # <tt>select_tag</tt> to allow filtering by issues with no assigned milestone
- def unassigned_milestone
- OpenStruct.new(id: 0, title: 'Unspecified')
- end
-
- def unassigned_issue
- OpenStruct.new(id: 0, name: 'Unassigned')
+ # Returns an OpenStruct object suitable for use by <tt>options_from_collection_for_select</tt>
+ # to allow filtering issues by an unassigned User or Milestone
+ def unassigned_filter
+ # Milestone uses :title, Issue uses :name
+ OpenStruct.new(id: 0, title: 'Unspecified', name: 'Unassigned')
end
end