Shifra Pride Raffel's blog
javascript_include_tag in Rails
Want to avoid feeling like a chump and spending countless hours troubleshooting a crazily-stupid-simple problem?
When you enter a .js in your javascripts directory and include it using a javascript_include_tag, take the <script> tags off the front and back.
You probably knew that already. Why didn't you tell me sooner?
Javascript thoughts of the day
Frankly, I used to disdain Javascript. I thought of it as a toy language (even though my friend Jim Davis implemented a huge nasty content management system in it and kept telling me that there was nothing toy about it). Proficiency in Javascript used to be a marker of low status in my eyes (well, except for Jim, who I just thought of as being perverse). Whenever I had to do anything with it, I swore about the constant errors, the lack of tools, and the general infernal twistedness.
Doing some more javascript and JSUnit stuff today, I'm quite impressed. Firebug allows you to console.debug any object and even to expand your command line to be a good usable size. I finally and reluctantly admit that Javascript is really worth knowing, and you can do serious TDD development with it using JSUnit. Sigh. If only I had listened to you, Jim.







