symbolize keys
This commit is contained in:
@@ -47,7 +47,7 @@ module DiscourseRewind
|
||||
reports = REPORTS.map { |report| report.call(params:, guardian:) }
|
||||
Discourse.redis.setex(key, CACHE_DURATION, MultiJson.dump(reports))
|
||||
else
|
||||
reports = MultiJson.load(reports)
|
||||
reports = MultiJson.load(reports, symbolize_keys: true)
|
||||
end
|
||||
|
||||
reports
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
<%- @reports.each do |report| %>
|
||||
<div class="rewind__report">
|
||||
<div class="rewind__report__header">
|
||||
<%= report['identifier'] %>
|
||||
<%= report[:identifier] %>
|
||||
</div>
|
||||
<div class="rewind__report__body">
|
||||
<%= report['data']['count'] %>
|
||||
<%= report[:data][:count] %>
|
||||
</div>
|
||||
</div>
|
||||
<%- end %>
|
||||
|
||||
Reference in New Issue
Block a user