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
38 39 40 41 42 43 44 45 46 |
# File 'lib/redmine/search.rb', line 38 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
26 27 28 |
# File 'lib/redmine/search.rb', line 26 def map(&) yield self end |
.register(search_type, options = {}) ⇒ Object
Registers a search provider
31 32 33 34 |
# File 'lib/redmine/search.rb', line 31 def register(search_type, ={}) search_type = search_type.to_s @@available_search_types << search_type unless @@available_search_types.include?(search_type) end |