FIX: Incorrect deprecation message.
This commit is contained in:
parent
aa4dccd0a1
commit
b66fc72c18
|
@ -457,17 +457,17 @@ module SiteSettingExtension
|
||||||
def setup_deprecated_methods
|
def setup_deprecated_methods
|
||||||
DEPRECATED_SETTINGS.each do |old_setting, new_setting, version|
|
DEPRECATED_SETTINGS.each do |old_setting, new_setting, version|
|
||||||
define_singleton_method old_setting do
|
define_singleton_method old_setting do
|
||||||
logger.warn("`SiteSetting##{name}` has been deprecated and will be removed in the #{version} Release. Please use `SiteSetting##{new_setting}` instead")
|
logger.warn("`SiteSetting.#{old_setting}` has been deprecated and will be removed in the #{version} Release. Please use `SiteSetting.#{new_setting}` instead")
|
||||||
self.public_send new_setting
|
self.public_send new_setting
|
||||||
end
|
end
|
||||||
|
|
||||||
define_singleton_method "#{old_setting}?" do
|
define_singleton_method "#{old_setting}?" do
|
||||||
logger.warn("`SiteSetting##{name}?` has been deprecated and will be removed in the #{version} Release. Please use `SiteSetting##{new_setting}?` instead")
|
logger.warn("`SiteSetting.#{old_setting}?` has been deprecated and will be removed in the #{version} Release. Please use `SiteSetting.#{new_setting}?` instead")
|
||||||
self.public_send "#{new_setting}?"
|
self.public_send "#{new_setting}?"
|
||||||
end
|
end
|
||||||
|
|
||||||
define_singleton_method "#{old_setting}=" do |val|
|
define_singleton_method "#{old_setting}=" do |val|
|
||||||
logger.warn("`SiteSetting##{name}=` has been deprecated and will be removed in the #{version} Release. Please use `SiteSetting##{new_setting}=` instead")
|
logger.warn("`SiteSetting.#{old_setting}=` has been deprecated and will be removed in the #{version} Release. Please use `SiteSetting.#{new_setting}=` instead")
|
||||||
self.public_send "#{new_setting}=", val
|
self.public_send "#{new_setting}=", val
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue