Project

General

Profile

Where do I find "Setting" from redmine.rb?

Added by Benjamin FRAUD almost 14 years ago

Hi!
I'm trying to add a new setting field in the main configuration view, containing some url. This setting has then to be read by redmine.rb in order to add a top-menu item which links to the external website related to the url. But I just can't get the setting in the file redmine.rb, the app crashes.
My code in the Redmine::MenuManager .top_menu function looks like that :

menu.push :some_link, Setting.link_url, :last => true

The setting "link_url" has been added to the settings.yml file. I don't get where settings are handled, is "Setting" only referring to the settings model? If that so, how do I reach it from redmine.rb? (I looked around, some files located in lib/redmine access it just the way I'm trying to, except it works!).

Thanks!