0

xray-rails Ctrl+ Shift+X不适用于 Rails 4

宝石文件

group :development, :test do
  gem 'xray-rails'
end

发展.rb

config.assets.debug = true

我捆绑了它

.
.
Using sass-rails 5.0.4
Using turbolinks 2.5.3
Using xray-rails 0.1.21
Bundle complete! 17 Gemfile dependencies, 68 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.

检查浏览器中的元素,F12向我展示

<!--XRAY START 37 /home/sample/app/views/shared/_list.html.haml-->
<ol>
  <li>
    <strong>
      <a href="#">Link</a>
    </strong>
  </li>
</ol>
<!--XRAY END 37-->

注意:我正在使用xray-railsrails 3.2,它工作正常

4

1 回答 1

0

添加xray.jsxray.css修复问题

应用程序.js

//= require jquery
//= require xray

应用程序.css

/*
 *= require bootstrap.min
 *= require xray
 */

然后按Ctrl++按预期Shift工作X

xray-rails

通常,中间件会自动插入它们,如此处所述

于 2016-08-18T09:13:04.160 回答