ruby on rails - Implement plugin specific settings in Redmine -


i'm developing plugin redmine , encountered issue of how implement plugin specific settings in redmine in neat way.

is possible have plugin specific settings in {redmine_home}/plugin/{my_plugin}/config/settings.yml while sharing core model (in mvc terms) logic reads yaml file, sets attributes of model class, provides easy access them, etc. ({redmine_home}/app/models/setting.rb)

i think copypasting or require'ing core model in plugin model poor design right i'm tending have plugin specific settings in core config {redmine_home}/config/settings.yml , when comes plugin controller read settings relies on core model that. ({redmine_home}/app/models/setting.rb)

is proper design? there better ways this?

thanks.

i checked 3 different plugins in our project used like:

options = yaml::load( file.open(file.join(rails.root, 'plugins/fancy_plugin/config', 'settings.yml'))) 

so copy pasting.


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -