I've inherited a project in which an ActiveRecord model is giving me strange behaviour. This is the only model that's behaving this way, so far.
car = Car.first
car.respond_to?(:each) # true
There is no each
method defined in Car
that I can find.
I read in another post that you can find out who injected the method, so I gave it a shot:
car.method(:each) # raises "undefined method `each' for class `Car'
I want to use Car
with draper but because my instance behaves like an Enumerable, draper treats it as such. Draper is not the issue, however.
What should I do to figure it out?