karmi/tire — Issue #236: Tire seems to clobber my instance methods
Author: hraynaud
Created: 2012-02-08 06:22:21+00:00
State: open

I am trying to create an index during an observer call back as follows

````Ruby
class SomeObserver < ActiveRecord::Observer

def after_create(object)
@object = object
...
end

def add_object_to_index
Tire.Index 'objects' do
store ...
end
end

end

This results in an undefined method `add_object_index ' for class `Tire::Index'? I have tried everything. The only that works is removing the references to tire completely. I know that the context/scope inside the Tire.index block refers to Tire itself. But how is it that it is affecting the scope of the observer instance?

Thanks for your help.