crowdAI/crowdai

View on GitHub
app/views/dynamic_contents/index.html.erb

Summary

Maintainability
Test Coverage
<div class='content'>
  <%= concept(Challenge::Cell::ChallengeMasthead,
                @challenge,
                current_participant: current_participant) %>
  <%= render partial: 'challenges/show/subnav',
        locals: { challenge: @challenge } %>
  <%#= concept(Challenge::Cell::ChallengeSubnav,
                @challenge,
                tab: 'dynamic',
                current_participant: current_participant) %>

  <div id='dynamic-content'>
    <%#= ERB.new(@challenge.dynamic_content).result(OpenStruct.new({challenge: @challenge, current_participant: current_participant}).instance_eval { binding }).html_safe %>
  </div>
</div>

<% if current_participant %>
  <div id='music-root2' data-participant_id='<%= current_participant.id %>'></div>
<% else %>
  <div id='music-root2' data-participant_id=''></div>
<% end %>