<%= javascript_include_tag 'active-docs/application' %>
<%= stylesheet_link_tag 'active-docs/application' %>

<%= render "menu" -%>

<div class='api-docs-wrap'></div>
<script>

  <% domain = current_account.domain
     domain += '.dev:3000' if Rails.env.development? -%>
  $(function(){
    ThreeScale.APIDocs.preview = true;
    ThreeScale.APIDocs.account_type = 'provider';

    ThreeScale.APIDocs.host = '//' + <%= json(domain).html_safe %>;
    <%# TODO: security hole - escape this properly %>
    ThreeScale.APIDocs.init(<%= json(@spec).html_safe %>);
  });
</script>
