Displaying 1 result from an estimated 1 matches for "d0e1ce51".
2006 Jul 17
3
Extending Ruby classes in Rails
Hi.
I''ve placed the following in lib/mods.rb:
class String
def String.foo
"bar"
end
def bar
"baz"
end
end
But it does not get picked up:
white:~/svn/tagticks morten$ script/console
Loading development environment.
>> String.foo
NoMethodError: undefined method `foo'' for String:Class
from (irb):1
>>