I have a pretty lame question regarding ruby. I have a following code:
@node = Node.find(params[:id])
@similar_nodes = Tire.search 'nodes', load: true do
query do
fuzzy_like_this @node.title
end
end
The problem is, that, for some reason, i can't access @node variable in fuzzy_like_this line. It returns nil even if Node has been found and i can access it in the second line. Can you please give me any advice why is that happening and what can i do to understand that behaviour better? I don't even know how to search for that.
Edit: Sorry for the typo in the title, ofcourse it should not be a "global" variable but instance variable.