【发布时间】:2012-05-22 01:22:39
【问题描述】:
我正在为我的 Rails 3.2.1 应用程序使用 best_in_place gem。我的开发没有错误。当我尝试在生产环境中运行应用程序时,我收到一个脚本错误
$(".best_in_place").best_in_place is not a function in my browser.
在我的视图页面中,我有以下代码
<%= stylesheet_link_tag "best_inplace", "jquery-ui-1.8.20.custom" %>
<%= javascript_include_tag "application", "jquery.dataTables.min" %>
<%= best_in_place @user, :description, :type => :textarea %>
<script>
jQuery(".best_in_place").best_in_place();
</script>
【问题讨论】:
-
stylesheet_link_tag
best_inplace缺少下划线_place -
不..它是正确的。这是我正在使用的样式表。
-
您需要向我们展示您的 application.js。这里的问题是,“为什么
best_in_place没有包含在我的页面中?”
标签: jquery ruby-on-rails-3 rubygems inplace-editing best-in-place