app/helpers/admin/configuration_helper.rb in trusty-cms-1.2.29 vs app/helpers/admin/configuration_helper.rb in trusty-cms-2.0.0.pre.beta
- old
+ new
@@ -67,10 +67,10 @@
html.html_safe
end
def setting_for(key)
@trusty_config ||= {} # normally initialized in Admin::ConfigurationController
- @trusty_config[key] ||= TrustyCms.config.find_or_create_by_key(key)
+ @trusty_config[key] ||= TrustyCms.config.find_or_initialize_by(key: key)
end
def definition_for(key)
if setting = setting_for(key)
setting.definition