Paloma – Finally A Sexy Way To Organize Rails Javascript Files

Wow. Rails compresses all my javascript files into one big file. Oh, that’s nice in terms of performance. But honestly I have a major problem. Considering that ALL my js files are loaded all at once — uhm — numerous variable clashes, code clashes, and other unexpected javascript behavior that are really frustrating started to appear almost in every page.

I end up having a bunch of if-else statements to make sure that the only the correct code will execute depending on the current context or current page. I also tried to manipulate the HTML by adding classes and id on the body to keep track in which controller-action pair does the page came from. I tried different techniques, but I find almost all of them complex and dirty.

If only there’s a simple way to organize my javascript files. If only there’s a way to execute a page-specific javascript.

Then I realized, “I can create a gem for that!”
read more »

Code Flexibility: Clients, Please Make Up Your Minds

Sadly, Nikola Tesla Is A Loser

The Confusing Feeling Called Hate

5 Success Lessons Taught By Efren “Bata” Reyes In A Magical Way

Demystifying The Discombobulating Concept Of Polymorphism

Ideas Versus Execution: Which One Is More Important For Success?

Facebook Status: What Will I Share Today?

Are You Brave Enough Not To Be Anonymous?

Magic Constants: Surprises And Frustrations

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.