sferik/rails_admin — pull request #785 by peymano (2011-10-18 00:10:16+00:00)
Title: ignore ActiveRecord models that are abstract_class=true

ActiveRecord models that are marked [abstract] (http://railsapi.com/doc/rails-v3.0.8rc1/classes/ActiveRecord/Base.html#M005059), such as:

class Part < ActiveRecord::Base
self.abstract_class = true
...
end

class AutoPart < Part
end

...cause RailsAdmin to throw an exception when visiting /admin ([full stack here](https://gist.github.com/cd5f96e48f4cb66c6617))

ActiveRecord::StatementInvalid (PGError: ERROR: relation "" does not exist
LINE 4: WHERE a.attrelid = '""'::regclass
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '""'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
):

The patch just skips over models that are abstract.