'Rails 4 stylesheet_link_tag sometimes uses relative paths?
I have this weird problem, where sometimes, stylesheet_link_tag
links to the relative path to the wrong path? The exact same code works whenever I try to debug and find out what's happening.
<%= stylesheet_link_tag '//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css' %>
<%= stylesheet_link_tag "bootstrap/sales_workflow/classic", :media => "all" %>
Both these work as they should - Most of the time. But sometimes, they link to
/en/listEM3181/maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css
and /en/listEM3181/assets/bootstrap/sales_workflow/classic.css
I don't know what page - But /en/list/EM3181/
is an existing page - And I suspect that.
Also I can't see why /list/EM3181
becomes /listEM3181
, suddenly.
Is there anything that can be done? Is it a known problem?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|