diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-03-14 17:48:35 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-03-14 17:48:35 -0700 |
commit | ee460111370905b51f39c5c6566e647bb6d1d0bd (patch) | |
tree | 0c229064d0aaa3bd9d29b5f6855091c2ae5b7a81 | |
parent | abba61e2bbe320894ba8449ebdf778a1d2af545b (diff) | |
download | rails-ee460111370905b51f39c5c6566e647bb6d1d0bd.tar.gz rails-ee460111370905b51f39c5c6566e647bb6d1d0bd.tar.bz2 rails-ee460111370905b51f39c5c6566e647bb6d1d0bd.zip |
Apparently people were mutating this array. :'(
This reverts commit abba61e2bbe320894ba8449ebdf778a1d2af545b.
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb index 18ddc3c322..d3abc88fd5 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb @@ -63,16 +63,15 @@ module ActiveRecord class TableDefinition # An array of ColumnDefinition objects, representing the column changes # that have been defined. - attr_accessor :indexes + attr_accessor :columns, :indexes def initialize(base) + @columns = [] @columns_hash = {} @indexes = {} @base = base end - def columns; @columns_hash.values; end - def xml(*args) raise NotImplementedError unless %w{ sqlite mysql mysql2 @@ -302,6 +301,7 @@ module ActiveRecord def new_column_definition(base, name, type) definition = create_column_definition base, name, type + @columns << definition @columns_hash[name] = definition definition end |