# Battle of Namings: stylesheet\_link\_tag vs link\_to\_javascript

**URL:** <https://www.ruby-forum.com/t/battle-of-namings-stylesheet-link-tag-vs-link-to-javascript/99790>\
**Category:** Rails\
**Created:** [July 25, 2006, 4:02pm UTC](https://www.ruby-forum.com/t/battle-of-namings-stylesheet-link-tag-vs-link-to-javascript/99790 "2006-07-25T16:02:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![newbee-robert](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/dbc845/32.png) [@newbee-robert](https://www.ruby-forum.com/u/newbee-robert)\
**Post date:** [July 25, 2006, 4:02pm UTC](https://www.ruby-forum.com/t/battle-of-namings-stylesheet-link-tag-vs-link-to-javascript/99790/1 "2006-07-25T16:02:09Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![newbee-robert](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/dbc845/32.png) [@newbee-robert](https://www.ruby-forum.com/u/newbee-robert)\
**Post date:** [July 25, 2006, 9:39pm UTC](https://www.ruby-forum.com/t/battle-of-namings-stylesheet-link-tag-vs-link-to-javascript/99790/2 "2006-07-25T21:39:41Z")

</div>

Submit a patch, with docs and tests.
