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



147
148
149
# File 'lib/redmine/search.rb', line 147

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

Instance Method Details

#default_search_scopeObject

Returns the default search scope according to the current action



175
176
177
178
# File 'lib/redmine/search.rb', line 175

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



170
171
172
# File 'lib/redmine/search.rb', line 170

def default_search_scopes
  self.class.default_search_scopes
end