refinery/refinerycms-settings

Adding Help Text and Removing Delete Option

aaronrutter opened this issue · 1 comments

I am pretty new to Ruby and may just be missing something very simple, but would definitely appreciate the help.
I am having an issue adding help text and removing the delete option. I noticed these nifty possibilities on the demo site. Looking at the setting view file I can see the unless statement for the help-info icon (Line 17). The delete icon has a method that references destroyable (Line 15) but I'm still getting output where the demo site is not.

I wanted to make it impossible to delete the Site Name (site_name) setting.

I first found everywhere the core site name setting was used:

:site_name => Refinery::Core.site_name

and changed it to this:

:site_name => ::Refinery::Setting.get(:site_name)

Then I edited /config/initializers/refinery/settings.rb:

config.find_or_set(:site_name, ::Refinery::Core.site_name, { :destroyable => false })

Along with that failure, all I can deduce about setting help text is the setting_field method from the settings_helper.rb (Line 16)

The Site Name setting is no longer set in refinerycms-settings and this package is no longer used by default in Refinery, only by some extensions. Instead, most things are configured just like in Rails using config/initializers/refinery/*.rb

The demo site is a little out of date in this way.