Use path helpers consistently
This commit is contained in:
@@ -151,7 +151,7 @@
|
||||
// get form fields
|
||||
var oldAction = $('#gollum-editor form').attr('action');
|
||||
var $form = $($('#gollum-editor form').get(0));
|
||||
$form.attr('action', this.href || '/preview');
|
||||
$form.attr('action', this.href || '<%= preview_path >');
|
||||
$form.attr('target', '_blank');
|
||||
var paths = window.location.pathname.split('/');
|
||||
$form.attr('page', paths[ paths.length - 1 ] || '')
|
||||
@@ -429,7 +429,7 @@
|
||||
}
|
||||
|
||||
// attempt to load the definition for this language
|
||||
var script_uri = baseUrl + '/assets/editor/langs/' + markup_name + '.js';
|
||||
var script_uri = '<%= assets_path %>/editor/langs/' + markup_name + '.js';
|
||||
$.ajax({
|
||||
url: script_uri,
|
||||
dataType: 'script',
|
||||
|
||||
+1
-1
@@ -101,7 +101,7 @@
|
||||
|
||||
var id = fieldAttributes.id || 'upload';
|
||||
var name = fieldAttributes.name || 'file';
|
||||
var action = fieldAttributes.action || '/upload_file';
|
||||
var action = fieldAttributes.action || '<%= upload_file_path %>';
|
||||
|
||||
html += '<form method=post enctype="multipart/form-data" ' +
|
||||
'action="' + action + '" ' + 'id="' + id + '">';
|
||||
@@ -4,6 +4,7 @@ module Precious
|
||||
module Views
|
||||
module RouteHelpers
|
||||
ROUTES = {
|
||||
assets: 'assets',
|
||||
'gollum' => {
|
||||
last_commit_info: 'last_commit_info',
|
||||
latest_changes: 'latest_changes',
|
||||
|
||||
Reference in New Issue
Block a user