Sha256: 07bc8555adc41dc01edb192d567088813a483b46f47369c5933170070e34255d

Contents?: true

Size: 871 Bytes

Versions: 4

Compression:

Stored size: 871 Bytes

Contents

# Routine for searching for accounts
#
# Caller provides a query and some options.  The query follows the rules of
# https://github.com/bruce/keyword_search, e.g.:
#
#   "username:jps,richb" --> returns the "jps" and "richb" accounts
#   "name:John" --> returns accounts with first, last, or full name starting with "John"
#
# Query terms can be combined, e.g. "username:jp first_name:john"
#
# There are currently two options to control query pagination:
#
#   :per_page -- the max number of results to return (default: 20)
#   :page     -- the zero-indexed page to return (default: 0)

module OpenStax
  module Accounts
    module Dev
      class SearchAccounts < OpenStax::Accounts::SearchAccounts
        def exec(query, options={})
          options = options.merge!(:max_matching_accounts => Float::INFINITY)
          super
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
openstax_accounts-3.1.1 app/routines/openstax/accounts/dev/search_accounts.rb
openstax_accounts-3.1.0 app/routines/openstax/accounts/dev/search_accounts.rb
openstax_accounts-3.0.0 app/routines/openstax/accounts/dev/search_accounts.rb
openstax_accounts-2.0.0 app/routines/openstax/accounts/dev/search_accounts.rb