1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<% content_for :extra_script do %> <script type="text/javascript"> (function () { var file = { uuid: '<%= @resource.uuid -%>', key: '<%= @resource.key -%>' <% if @line %>, line: <%= @line -%><% end %> }; require(['apps/source-viewer/app'], function (App) { App.start({ el: '#body', file: file }) }); })(); </script> <% end %>