resolves an object.
4 5 6 7 8 9 10 11
# File 'lib/vex/active_record/resolver.rb', line 4 def resolve(obj) case obj when self then obj when String then self.find(Integer(obj)) when Array then obj.map { |o| resolve(o) } else self.find(obj) end end