Calamitas
10/2/2008 9:56:00 PM
[Note: parts of this message were removed to make it a legal post.]
On Thu, Oct 2, 2008 at 11:14 PM, Davi Barbosa
<d.barbosa+ruby@gmail.com<d.barbosa%2Bruby@gmail.com>
> wrote:
> Thank you for the answer Peter, but the problem remains. Your suggestion
> works on ruby, irb, and eruby if I run directly from the shell, but when
> I try to open the page I get an "undefined method" error.
>
It was a long shot as I've never used mod_ruby so I can't test any fix.
Can you try this instead?
class Object::Array
def to_hash
{'test' => 'ing'}
end
end
Nonetheless it's probably better style to put any definitions in a separate
Ruby file and requiring it from the rhtml file.
Peter