Module: Redmine::Search
- Defined in:
- lib/redmine/search.rb
Defined Under Namespace
Modules: Controller Classes: Fetcher, Tokenizer
Constant Summary collapse
- @@available_search_types =
[]
Class Method Summary collapse
-
.cache_store ⇒ Object
Returns the cache store for search results Can be configured with config.redmine_search_cache_store= in config/application.rb.
- .map {|_self| ... } ⇒ Object
-
.register(search_type, options = {}) ⇒ Object
Registers a search provider.
Class Method Details
.cache_store ⇒ Object
Returns the cache store for search results Can be configured with config.redmine_search_cache_store= in config/application.rb
39 40 41 42 43 44 45 46 47 |
# File 'lib/redmine/search.rb', line 39 def cache_store @@cache_store ||= begin # if config.search_cache_store was not previously set, a no method error would be raised config = Rails.application.config.redmine_search_cache_store rescue :memory_store if config ActiveSupport::Cache.lookup_store config end end end |
.map {|_self| ... } ⇒ Object
27 28 29 |
# File 'lib/redmine/search.rb', line 27 def map(&block) yield self end |
.register(search_type, options = {}) ⇒ Object
Registers a search provider
32 33 34 35 |
# File 'lib/redmine/search.rb', line 32 def register(search_type, ={}) search_type = search_type.to_s @@available_search_types << search_type unless @@available_search_types.include?(search_type) end |