Updates comments for r13811.

git-svn-id: http://svn.redmine.org/redmine/trunk@13812 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2014-12-26 12:05:01 +00:00
parent 14074fa4c2
commit 88ec93ab74

View File

@@ -64,7 +64,7 @@ module Redmine
# Searches the model for the given tokens and user visibility. # Searches the model for the given tokens and user visibility.
# The projects argument can be either nil (will search all projects), a project or an array of projects. # The projects argument can be either nil (will search all projects), a project or an array of projects.
# Returns an array that contains the rank and id of all results. # Returns an array that contains the rank and id of all results.
# In current implementation, the rank is the record timestamp. # In current implementation, the rank is the record timestamp converted as an integer.
# #
# Valid options: # Valid options:
# * :titles_only - searches tokens in the first searchable column only # * :titles_only - searches tokens in the first searchable column only
@@ -73,7 +73,7 @@ module Redmine
# #
# Example: # Example:
# Issue.search_result_ranks_and_ids("foo") # Issue.search_result_ranks_and_ids("foo")
# # => [[Tue, 26 Jun 2007 22:16:00 UTC +00:00, 69], [Mon, 08 Oct 2007 14:31:00 UTC +00:00, 123]] # # => [[1419595329, 69], [1419595622, 123]]
def search_result_ranks_and_ids(tokens, user=User.current, projects=nil, options={}) def search_result_ranks_and_ids(tokens, user=User.current, projects=nil, options={})
if projects.is_a?(Array) && projects.empty? if projects.is_a?(Array) && projects.empty?
# no results # no results