michaeldv/awesome_print — Issue #56: ap cannot print ActiveRecord::Base class ancestors
Author: raykin
Created: 2011-10-13 02:51:17+00:00
State: open

```ruby
irb(main):001:0> ap Investor.ancestors
NoMethodError: undefined method `abstract_class?' for Object:Class
from /home/raykin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activerecord-3.0.10/lib/active_record/base.rb:1212:in `class_of_active_record_descendant'
from /home/raykin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activerecord-3.0.10/lib/active_record/base.rb:830:in `base_class'
from /home/raykin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activerecord-3.0.10/lib/active_record/base.rb:962:in `compute_table_name'
from /home/raykin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activerecord-3.0.10/lib/active_record/base.rb:607:in `reset_table_name'
from /home/raykin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activerecord-3.0.10/lib/active_record/base.rb:597:in `table_name'
from /home/raykin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activerecord-3.0.10/lib/active_record/base.rb:685:in `columns'
from /home/raykin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/awesome_print-0.4.0/lib/ap/mixin/active_record.rb:46:in `awesome_active_record_class'
from /home/raykin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/awesome_print-0.4.0/lib/ap/awesome_print.rb:171:in `awesome'
from /home/raykin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/awesome_print-0.4.0/lib/ap/awesome_print.rb:69:in `block (2 levels) in awesome_array'
from /home/raykin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/awesome_print-0.4.0/lib/ap/awesome_print.rb:297:in `indented'
from /home/raykin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/awesome_print-0.4.0/lib/ap/awesome_print.rb:68:in `block in awesome_array'
from /home/raykin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/awesome_print-0.4.0/lib/ap/awesome_print.rb:62:in `each'
from /home/raykin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/awesome_print-0.4.0/lib/ap/awesome_print.rb:62:in `inject'
from /home/raykin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/awesome_print-0.4.0/lib/ap/awesome_print.rb:62:in `awesome_array'
from /home/raykin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/awesome_print-0.4.0/lib/ap/awesome_print.rb:171:in `awesome'
from /home/raykin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/awesome_print-0.4.0/lib/ap/core_ext/kernel.rb:10:in `ai'
from /home/raykin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/awesome_print-0.4.0/lib/ap/core_ext/kernel.rb:15:in `ap'
from (irb):1
from /home/raykin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.0.10/lib/rails/commands/console.rb:44:in `start'
from /home/raykin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.0.10/lib/rails/commands/console.rb:8:in `start'
from /home/raykin/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.0.10/lib/rails/commands.rb:23:in `'
from script/rails:6:in `require'
from script/rails:6:in `

'irb(main):002:0>
```