diff --git a/lib/active_record/annotate/dumper.rb b/lib/active_record/annotate/dumper.rb index 9caec84..a55f8d1 100644 --- a/lib/active_record/annotate/dumper.rb +++ b/lib/active_record/annotate/dumper.rb @@ -4,8 +4,9 @@ module Dumper class << self def dump(table_name, connection = ActiveRecord::Base.connection, config = ActiveRecord::Base) string_io = StringIO.new - - if connection.table_exists?(table_name) + + if connection.table_exists?(table_name) || + connection.respond_to?(:view_exists?) && connection.view_exists?(table_name) dumper(connection, config).send(:table, table_name, string_io) else string_io.write(" # can't find table `#{table_name}`")