Rails 3.1 Sprockets require directives - is there a way to exclude particular files?

后端 未结 5 949
独厮守ぢ
独厮守ぢ 2020-12-28 12:24

If I\'m using //=require_tree . in application.css, is there a way to exclude particular files other than resorting to //=require_directory and tre

5条回答
  •  情话喂你
    2020-12-28 12:49

    Since the release of rails 3.2.9, it has support to lock the sprockets to version 2.2.x so that we can use the //= stub directive that latest sprockets have.

    //= stub unwanted_js
    

    http://weblog.rubyonrails.org/2012/11/12/ann-rails-3-2-9-has-been-released/

    So, to use it, just upgrade to Rails 3.2.9

提交回复
热议问题