12.10.05

Ruby tricks: escaping/unescaping

Posted in Uncategorized, Mac OS X, computers, TextMate, ruby/rails at 2:20 pm by Haris

I am starting to really like Ruby! I was working on my plugin, for Gregarius, and I found myself having to often have the php code spit out javascript code using echo. So something like:

function myinsert(node) {
    var ob = document.getElementById("maindiv");
    ob.setAttribute('style','display:none');
}

would be converted to:

Read the rest of this entry »