Module: Redmine::Search::Controller

Included in:
ApplicationController
Defined in:
lib/redmine/search.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object


35
36
37
# File 'lib/redmine/search.rb', line 35

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#default_search_scopeObject

Returns the default search scope according to the current action


63
64
65
66
# File 'lib/redmine/search.rb', line 63

def default_search_scope
  @default_search_scope ||= default_search_scopes[controller_name.to_sym][:actions][action_name.to_sym] ||
                            default_search_scopes[controller_name.to_sym][:default]
end

#default_search_scopesObject


58
59
60
# File 'lib/redmine/search.rb', line 58

def default_search_scopes
  self.class.default_search_scopes
end