Skip to content

Commit

Permalink
1.2.7: #2
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Jan 10, 2018
1 parent 2da8eda commit 52a74e7
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion plugin.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# name: df-core
# about: A common functionality of my Discourse plugins.
# version: 1.2.6
# version: 1.2.7
# authors: Dmitry Fedyuk
# url: https://discourse.pro
#register_asset 'javascripts/lib/sprintf.js'
Expand Down Expand Up @@ -101,6 +101,17 @@ def request(method, params = {})
# without a `require 'distributed_cache';` statement?": https://meta.discourse.org/t/77580
require 'distributed_cache'
require 'site_setting_extension'
SiteSettings::TypeSupervisor.module_eval do
alias_method :core__to_rb_value, :to_rb_value
def to_rb_value(name, value, override_type = nil)
begin
result = core__to_rb_value(name, value, override_type)
rescue ArgumentError
result = value
end
return result
end
end
SiteSettingExtension.module_eval do
alias_method :core__types, :types
def types
Expand Down

0 comments on commit 52a74e7

Please sign in to comment.