I’m having a problem redefining a method in one of my modules. Lets
say I have this module in /lib:
module Hello
def say_hello
“hello”
end
end
And one of my ActiveRecord models mixes it in like:
class Item < ActiveRecord::Base
include Hello
end
This works fine, I can call @item.say_hello just fine. But when I try
to redefine the method:
class Item < ActiveRecord::Base
include Hello
def say_hello
“Hola!”
end
end
It only works on the first page load after restarting the server.
Every page load after that says method say_hello is undefined. I
suspect that means it has something to do with caching? But I don’t
know enough about the internals to figure it out…
Thanks,
Justin