I’m currently developing an admin dashboard using Sinatra, and I’m finding for one route in particular, my stylesheets and javascripts aren’t working.
The route is '/users/:id/?'
For some reason, when I hit that page, the browser is looking for http::localhost:9393/users/css/my_stylesheet.css instead of public/css/my_stylesheet.css and so-on. Why is this happening with this route? The layout file (containing the stylesheet and script links) is that same for this route as it is for any other.
Never mind. Went on the #sinatra IRC channel and asked. My problem was how I was referencing the links in my haml views. I need to use the url helper
#{url ('/path/to/asset.css')}in my code instead of hard-coding the links in.