Battle of Namings: stylesheet_link_tag vs link_to_javascript

Link helper namings counterintuitive in an environment where convention
over
configuration prevails:

<%= link_to_javascript ‘myscript’ %>
<%= stylesheet_link_tag ‘mystyle’ %>

A simple def in ActionView::Helpers::AssetTagHelper would fix things in
a
nice, backward-compatible way, such that:

<%= link_to_javascript ‘myscript’ %>
<%= link_to_stylesheet ‘mystyle’ %>

In the meantime I can do a def in my own app’s helpers.

Submit a patch, with docs and tests.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs