From: Jean-Julien Fleck Date: 2010-03-31T13:40:10+09:00 Subject: Re: want to convert this php code to ruby................. 2010/3/30 HUNT HUNT : > function tooltip($el,$content,$options=array()) { >        if ( substr($content,0,1)!='$') $content = "'$content'"; >        if($options) { >            return > $this->Javascript->codeBlock($this->output(sprintf($this->tooltip['fancy'],$el,$content,$this->_parseOptions($options)))); >        } else { >            return > $this->Javascript->codeBlock($this->output(sprintf($this->tooltip['base'],$el,$content))); >        } >    } My advice: try to do it yourself first and post back when you are stuck somewhere, explaining what you've tried and what went wrong. Hint: it should looks like def tooltip(el,content,options=nil) your_code_goes_here end Cheers, -- JJ Fleck PCSI1 Lycée Kléber