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
Post a Comment