Hi !
2005/12/29, Gary Barlow <garybarlow@hotmail.com>:> class MyClass
>
> logger = RAILS_DEFAULT_LOGGER
>
> def myMethod
> logger.debug("stuff...")
> end
>
> end
In #myMethod, Ruby will resolve logger as a local variable, which is
nil. What you should do instead is:
class MyClass
def logger
RAILS_DEFAULT_LOGGER
end
def myMethod
logger.debug "stuff"
end
end
Hope that helps !
--
François Beausoleil
http://blog.teksol.info/
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails