正如标题所述,我有一个如下所示的 application.js.erb 文件:
//= require jquery
//= require jquery-ui
//= require bootstrap
//= require html5shiv
//= require_tree .
$(document).ready(function(){
$("#opening-first").fadeIn(1000, function() {
$("#opening-second").fadeIn(1000, function() {
$("#opening-container").delay(500).fadeOut(1000, function() {
$("#body-overlay").fadeOut(1000);
});
});
});
$(".me").on('click', function(){
fadeAndReload('<%= me_home_index_path %>');
});
$(".home").on('click', function(){
fadeAndReload('<%= root_path %>');
});
function fadeAndReload(fileName) {
var body = $("#reload-me");
body.fadeOut(500, function() {
body.load(fileName, function() {
body.fadeIn(500);
});
});
}
});
我的路线如下:
home_index GET /home/index(.:format) home#index
me_home_index GET /home/me(.:format) home#me
root / home#index
我收到以下错误:
undefined local variable or method `me_home_index_path' for #<#<Class:0x007f99d63b5728>:0x007f99d65ef9d0>
(in /Users/[filepathhere]/javascripts/application.js.erb)
问题是什么??