Skip to content
Snippets Groups Projects
Commit a38c6550 authored by Hassan Amouhzi's avatar Hassan Amouhzi
Browse files

Fix bug in ace-src-noconflict with Relative url.

If we doesn't use a relative url we have this:
<pre>gon.relative_url_root=""</pre>
Else <pre>gon.relative_url_root="/gitlab"</pre>

Gitlab::Application.config.assets.prefix contains:
<pre>/assets</pre>
parent 0a44ecf3
No related branches found
No related tags found
2 merge requests!5081fixed command to update init script,!4826Fix bug in ace-src-noconflict with Relative url.
Loading
Loading
@@ -31,7 +31,7 @@
= link_to "Cancel", project_blob_path(@project, @id), class: "btn btn-cancel", confirm: leave_edit_message
 
:javascript
ace.config.set("modePath", "#{Gitlab::Application.config.assets.prefix}/ace-src-noconflict")
ace.config.set("modePath", gon.relative_url_root + "#{Gitlab::Application.config.assets.prefix}/ace-src-noconflict")
var ace_mode = "#{@blob.language.try(:ace_mode)}";
var editor = ace.edit("editor");
if (ace_mode) {
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment