0

I have read following in an article

All of your custom Javascript, stylesheets, and images should go in the app/assets/.

All third-party code that you are using (e.g. jQuery, backbone.js, etc.) should be placed in the vendor/assets/ directory

But I did not find in the article - Why it is recommended so, any reasons?

Community
  • 1
  • 1

2 Answers2

0

There is no restriction that you cant put third party jQuery/CSS in the app/assets folder.

But its recommended to put the third party assets in the vendor file. It will be easily manageable for the large applications and will save a lots of time in the long run.

M. Karim
  • 932
  • 1
  • 9
  • 18
0

Well I presume you are clear with app/assets/ folder.

In vendor/assets you put all third-party code that you are using. So after you put that code in assets you need to require them in application.css and application.js.

This is doing on this way because rails by default look in vendor/assets/ and it is easier to manage third-party code.

RubyDigger19
  • 835
  • 13
  • 38