Class: ActiveRecord::SchemaDumper

Inherits:
Object
  • Object
show all
Defined in:
lib/empty_eye/active_record/schema_dumper.rb

Instance Method Summary collapse

Instance Method Details

#tables(stream) ⇒ Object

we dont want views in our schema file



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/empty_eye/active_record/schema_dumper.rb', line 4

def tables(stream)
  @connection.tables_without_views.sort.each do |tbl|
    next if ['schema_migrations', ignore_tables].flatten.any? do |ignored|
      case ignored
      when String; tbl == ignored
      when Regexp; tbl =~ ignored
      else
        raise StandardError, 'ActiveRecord::SchemaDumper.ignore_tables accepts an array of String and / or Regexp values.'
      end
    end 
    table(tbl, stream)
  end
end