EppO/rolify — pull request #231 by jfeaver (2014-02-19 23:26:18+00:00)
Title: fixes #168 - ensure rolify fails if roles table is missing

While setting up the application in a new environment, I get stuck after my User model calls `rolify`. I'm also using Devise with the same User model as the one calling `rolify`. Devise gets initialized after running `rake:db:migrate`, loads the User model, and causes the rolify line to raise a `PG::UndefinedTable: ERROR: relation "roles" does not exist` exception.

A `sanity_check` method was created in the first fix to #168 but did not fix the issue for me. Here, I fix it by making sure that if the roles table does not exist, `role_table_missing?(role_class)` will always return `true` rather than returning `false` for a missing database connection.