gregbell/active_admin — Issue #639: Rails 3.1.1 loads the application but does not initialize it
Author: mchung
Created: 2011-10-18 04:57:55+00:00
State: open

I had a section that looked like this:

section "#{Subscription.count} members", :priority => 5 do
# ...
end

Running `rake assets:clean` or `rake assets:precompile` caused:

```
rake aborted!
PGError: ERROR: relation "subscriptions" does not exist
LINE 4: WHERE a.attrelid = '"subscriptions"'::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 = '"subscriptions"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
```

Removing the interpolated string from `section` fixed it. Worked in 3.1.0 and broke in 3.1.1.

I reviewed the rails-3.1.1 announcement and I'm taking a guess that this error has something to do with the way that Rails is loaded.

This is a low priority/no-fix issue.