I want to create a new folder in app/assets
, in this folder I have some file, each file have css folder and javascript folder, like the below given addresses:
app/assets/plugins/bootstrap/css/bootstrap.min.css
app/assets/plugins/bootstrap/js/bootstrap.min.js
I use below code to define css
file, but not true and rails cannot find and load bootstrap.min.css
:
<%= stylesheet_link_tag "bootstrap.min", media: "all", "data-turbolinks-track" => true %>
<%= stylesheet_link_tag "../plugins/bootstrap/css/bootstrap.min", media: "all", "data-turbolinks-track" => true %>
How can I declare css
and javascript
from plugin
folder?
Note:
When I want see the css
file in browser by this address:
http://localhost:3000/assets/plugins/bootstrap/css/bootstrap.min.css
I get below error:
No route matches [GET] "/assets/plugins/bootstrap/css/bootstrap.min.css"
But for css file that exist in assets/stylesheets/
I can see css file in browser by enter address like top. Why the diffrent beetwin stylesheets
and plugins
directory?