In Chapter 1, Introduction to Redmine Plugins, we were introduced to the Redmine plugin's initialization file as well as some of the attributes, methods, and helpers available to plugin authors.
The settings
attribute was presented as a way for plugin settings to be initialized as well as a configuration partial view to be defined:
Redmine::Plugin.register :redmine_knowledgebase do # ... settings :default => { :sort_category_tree => 1, :show_category_totals => 1, :summary_limit => 5, :disable_article_summaries => 0 }, :partial => 'redmine_knowledgebase/knowledgebase_settings' # ... end
Our plugin's settings
field is initialized with a hash that expects two keys: