Summary: Avoid $$(".classname") on large DOMs!!!
I've recently been optimising the guts out of a JS webapp I wrote, which was making IE crawl to a halt. I discovered this after introducing a stress-inducing data set. (Using Rails' fixtures makes light work of this; since the fixtures are Ruby templates just like the web templates, it's [...]
[Read more →]
Tags: DHTML·ERb·Javascript·Links·Optimisation·Optimization·Performance·Rails·Tuning
So you're coding a partial and you want to know which template has pulled it in. The magic word is "@first_render", which will give you something like "homepage/admin" for the homepage/admin.rhtml template. Trivial, I know, but I couldn't find any mention of it after much googling, so I decided to output self.inspect and was pleased [...]
[Read more →]
Tags: ERb·Partials·Rails·Ruby·Web