mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 05:58:19 +08:00
DEV: Replace custom Onebox symbolize_keys implementation with ActiveSupport (#23828)
We have a custom implementation of #symbolize_keys in our Onebox helpers. This is likely a legacy from when Onebox was a standalone gem. This change replaces all usages with either #deep_symbolize_keys from ActiveSupport, or appropriate option to the JSON parser gem used.
This commit is contained in:
@ -12,7 +12,7 @@ module Onebox
|
||||
attr_reader :view
|
||||
|
||||
def initialize(name, record)
|
||||
@record = Onebox::Helpers.symbolize_keys(record)
|
||||
@record = record.deep_symbolize_keys
|
||||
|
||||
# Fix any relative paths
|
||||
if @record[:image] && @record[:image] =~ %r{\A/[^/]}
|
||||
|
Reference in New Issue
Block a user