-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ reinstallBehavior = (context)-> | |
textarea.delayedObserver -> | ||
callback = (html)-> | ||
$('.preview .content', form).html(html) | ||
$.get('/admin/comments/preview', content: textarea.val(), callback) | ||
$.get('./admin/comments/preview', content: textarea.val(), callback) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
stbuehler
Author
Owner
|
||
|
||
$(document).ready -> | ||
reinstallBehavior() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -158,3 +158,18 @@ module RailsExtensions | |
attr_accessor :config | ||
end | ||
end | ||
|
||
# Fix asset paths to work in subdir mounted apps | ||
module ActionView | ||
class AssetPaths | ||
# setup url helper usage | ||
include ActionController::UrlFor | ||
include Rails.application.routes.url_helpers | ||
delegate :env, :request, :to => :controller | ||
|
||
# fix relative url root | ||
def relative_url_root | ||
root_path.chomp('/') | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
stbuehler
Author
Owner
|
||
end | ||
end | ||
end |
You should use
root_path
here instead of./
.