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


139
140
141
# File 'lib/redmine/search.rb', line 139

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

Instance Method Details

#default_search_scopeObject

Returns the default search scope according to the current action


167
168
169
170
# File 'lib/redmine/search.rb', line 167

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


162
163
164
# File 'lib/redmine/search.rb', line 162

def default_search_scopes
  self.class.default_search_scopes
end