ruby-on-rails - Active_Admin 删除不起作用 - 未捕获的类型错误 : Cannot read property 'mozilla' of undefined

标签 ruby-on-rails activeadmin

我最近更新到最新版本的事件管理员,现在我的删除按钮不起作用。我正在使用未经修改生成的标准页面。我在浏览器调试控制台上收到此错误:

未捕获的类型错误:无法读取未定义的 active_admin.js:9612 的属性“mozilla”
(匿名函数)active_admin.js:9612
(匿名函数)active_admin.js:10118

这是我的 application.js 文件。

// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll     automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
//= require jquery
//= require underscore

我在我的网站上使用 jquery,所以我确定它被包含在内。

我已经多次运行 rails generate active_admin:assets 。我一直在尝试解决这个问题大约 10 个小时,但我很难过。任何帮助将不胜感激。

最佳答案

加载 JQuery js 库后,将以下内容添加到您的 HTML 代码中:(使用 JQuery 1.9 版和 + 时发生)

  <script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>

关于ruby-on-rails - Active_Admin 删除不起作用 - 未捕获的类型错误 : Cannot read property 'mozilla' of undefined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15675160/

相关文章:

ruby-on-rails - Apache with Passenger 不加载 Rails 应用程序

ruby-on-rails - Rails5 - ruby​​ 2.2.3//ActiveSupport::TimeZone 是如何改变的?

javascript - 在 Rails API 中使用 Devise Token Auth gem 的不允许的参数

ruby-on-rails - Rails 远程表单验证

ruby-on-rails-3 - Activeadmin 和 Formtastic : form not responding to :size

forms - Active Admin,Rails 4 嵌套表单删除然后插入 has_one 模型

html - 在 Rails 中从 HTML 输入转换为 form_for 会改变格式吗?

ruby-on-rails - ActiveAdmin 不在主菜单上进行模型翻译

ruby-on-rails - 缓慢的 activeadmin 索引页面

ruby-on-rails-4 - Rails omniauth-saml + devise + ADFS 问题