ActiveRecordでTableの存在をチェックする


[ruby]
ActiveRecord::Base.connection.table_exists? ‘posts’
[/ruby]

参考: http://stackoverflow.com/questions/6590107/check-if-a-table-exists-in-rails