Actions
Feature #8215
openAllow plugins to register as a search provider without a project association
Status:
New
Priority:
Normal
Assignee:
-
Category:
Search engine
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Description
Plugins can be added to the global search by means of
Redmine::Search.available_search_types << 'your_model'
But only if the model you're trying to search belongs_to :project
. Without this association, though the plugin is added to the search providers, it will always error out with the following:
ActiveRecord::ConfigurationError in SearchController#index Association named 'project' was not found; perhaps you misspelled it?
and if you actually add the required association, you'll never get any results (unless the user is associated with some project on the system).
Since Redmine is project-centric, I understand why the association is necessary, but wonder if there's a way to accommodate plugins that don't require a project ...
Actions