Adapt STI handling for rails 3