Rails, Nivo Slider and the asset pipeline
-
27-10-2019 - |
题
So I've got a simple rails app and I want to display an image rotator on the front page. Decidd to give Nivo slider a go, which was pretty simple to put the JavaScript and CSS in the relevant asset folders, but my question now is What to do with the images and styles that go in the theme directories, fitting in with the overall asset pipeline. Right now it works, it's just sort of ugly.
解决方案
You can add the folders to the asset-pipeline, i.e.
config/application
config.assets.paths << "#{Rails.root}/app/path_to_themes/themes/"
不隶属于 StackOverflow