Domanda

I am trying to integrate a wrapbootstrap theme, that among other things has a folder of ~20 JS plugins:

enter image description here

My understanding is that rails 4 no longer allows you to put these plugins in vendor/plugins. Assuming this is true, what is the most efficient way to integrate ~20 plugins into an app? Do I need to move all CSS, JSS, images to their respective assets folders? This seems pretty cumbersome.

Appreciate the help.

È stato utile?

Soluzione

You will need to take all .js file and put into app/assets/javascripts folder and take all .css file and put into app/assets/stylesheets folder. After you moved the following file, you need to update your application.js and application.css and reference it

Take a look at mine for example:

app/assets/javascripts/application.js

//= require jquery
//= require jquery_ujs
//= require jquery.ui.all
//= require jquery.datetimepicker
//= require bootstrap.min
//= require turbolinks
//= require jquery_nested_form
//= require_tree .

app/assets/stylesheets/application.css

/*
 *= require bootstrap.min
 *= require jquery.ui.all
 *= require jquery.datetimepicker
 *= require alert
 *= require_tree .
 *= require_self
 */
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top