Skip to content

Commit 32ed8ac

Browse files
committed
Show app data to admins
1 parent 8353113 commit 32ed8ac

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

app/controllers/participants_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ def show
7979
if current_user.administrator?
8080
add_breadcrumb 'Participants', :participants_path
8181
add_breadcrumb @user.username, participant_path(@user)
82+
@app_data = JSON.pretty_generate(JSON.parse(current_user.user_app_data.to_json))
8283
else
8384
add_breadcrumb 'My stats', participant_path(@user)
8485
end

app/views/participants/show.html.erb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,10 @@
104104
<% end %>
105105
<%= show_submission_list(@submissions) %>
106106
</section>
107+
108+
<% if @app_data %>
109+
<section>
110+
<h2>App data</h2>
111+
<pre><%= @app_data %></pre>
112+
<section>
113+
<% end %>

0 commit comments

Comments
 (0)