Since quiet some time i fail to remember how to include javascript and css.
stylesheet_include_tag and javascript_link_tag or
javascript_tag and stylesheet_tag ???
Since im so pragmatig (read: forgetful+lazy) i came up with a simple solution:
#application_helper.rb module ActionView::Helpers::AssetTagHelper alias js_tag javascript_include_tag alias css_tag stylesheet_link_tag end
now it starts looking nice and clean 🙂
<%= js_tag 'ufo' %> <%= js_tag 'jquery.min.js' %>
I think this may cause difficulties in code interpretation. In addition, this does not improve the software functionality, and this type of tag is used a few times (most times in the layout only). I do not think good idea increase code entropy in favor of readability, what do you think?
i think it improves readability/writability(no need to think: need js -> use js_tag), but like all aliases it has the drawbacks you mentioned. So far all newcommers to our project have used js/css_tag without asking questions 🙂