I think I\'m trying to get the PHP equivalent of print_r() (print human-readable); at present the raw output is:
ActiveRecord::Relation:0x10355d
I generally first try .inspect, if that doesn't give me what I want, I'll switch to .to_yaml.
class User
attr_accessor :name, :age
end
user = User.new
user.name = "John Smith"
user.age = 30
puts user.inspect
#=> #
puts user.to_yaml
#=> --- !ruby/object:User
#=> age: 30
#=> name: John Smith
Hope that helps.