mirror of
https://github.com/discourse/discourse-rewind.git
synced 2025-07-07 22:32:11 +00:00
symbolize keys
This commit is contained in:
parent
d7b69d11b7
commit
925cfeffd1
@ -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 %>
|
||||
|
Loading…
x
Reference in New Issue
Block a user