Different from Rails 3 stylesheet_link_tag behaviour
In Rails 3, stylesheet_link_tag adds ".css" extension if there is no one.
But in Redmine
stylesheet_link_tag('jquery/jquery.qtip', :plugin => 'my_plugin')
So that I have to add ".css" extension.
#1 Updated by Jean-Philippe Lang about 1 year ago
According to the tests, it should work as expected:
But I'll check that.
#4 Updated by John Yani about 1 year ago
Jean-Philippe Lang wrote:
This is actually the Rails 3 behaviour.
What do you mean? Don't you believe that this
correctly resolved as this in Rails 3:
I've just rechecked. Did you do a test with vanilla Rails 3, i.e. without Redmine monkey patches?
#5 Updated by Jean-Philippe Lang about 1 year ago
Please, have a look at the Rails API documentation (FYI: http://api.rubyonrails.org). This is how
#stylesheet_link_tag is documented:
If you don’t specify an extension, .css will be appended automatically
And there's an explicit example:
stylesheet_link_tag "random.styles", "/css/stylish" # => <link href="/stylesheets/random.styles" media="screen" rel="stylesheet" type="text/css" /> <link href="/css/stylish.css" media="screen" rel="stylesheet" type="text/css" />
.css is not appended to random.styles because the extension is specified.
#7 Updated by Jean-Philippe Lang about 1 year ago
After a few tests with a blank Rails 3.2.3 app, it turns out that this behaviour changes when turning
config.assets.enabled = true=> .css is always appended
config.assets.enabled = false=> it works as documented
Anyway, this is a Rails issue and Redmine doesn't change this behaviour.