I'm new to rails, I have created an app in which user has a profile and that can be edited with edit profile option.
In controller I have,
ProfilesController
In Views I have,
index.html.erb
edit.html.erb
It all works fine for index page, but for the edit page it's cool for first load and then after refreshing it, the css files are not loading.
url looks like http://localhost:3000/profiles/25/edit
Everything works right for index page no matter how many refreshes, but it's disappointing for edit page.I have inspected elements in browser, it says GET http://localhost:3000/profiles/25/assets/bootstrap.min.css [HTTP/1.1 404 Not Found 650ms]
i.e it searches for files in localhost:3000/profiles/25/assets/ which doesn't exists instead of searching in localhost:3000/assets/
EDIT :
Structure:
app/assets/stylesheets
application.css
bootstrap.min.css
style.css
In application.html.erb , I link application.css as,
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
and other css files as
<link href="assets/style.css" rel="stylesheet">
<link href="assets/bootstrap.min.css" rel="stylesheet">
Am I correct with structure and linking? If not then where to place and use external css files.
Please help!! Thanks in advance.
profiles/25/assets/bootstrap.css, can you show us the code?