Why use gems for serving assets instead of the vendor file?

前端 未结 4 1115
余生分开走
余生分开走 2021-01-21 19:12

I am relatively new to Rails and I have a question about serving assets from a gem vs just loading the files into the asset pipeline.

As far as I can tell, they do virtu

4条回答
  •  旧时难觅i
    2021-01-21 20:02

    jquery-rails is gem contains js file for both jquery.js, jquery_ujs.js. If you does not include jquery-rails, then you have include both jquery.js and jquery_ujs.js.If you are not using gem for jquery-rails, you have manually keep track what version jquery.js is used for jquery_ujs.js. Currently these dependency management is taken care by gem 'jquery-rails'.

提交回复
热议问题