Hi all,
I'm trying to iterate over the properties of an ActiveRecord object. I've been searching online but I keep coming up blank. I thought I was getting warm with object.to_enum, but despite the fact that this returns an Enumerator object, I still get the error saying that 'each' is undefined for my object.
Calling object.methods gives me a bunch of inherited stuff I don't want. Calling object.instance_variables doesn't give me anything close to what I seek. I'm guessing this isn't hard, but I just haven't figured it out yet :) Can anyone help? Thanks!