aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/schema
diff options
context:
space:
mode:
authorlulalala <mark@goodlife.tw>2012-10-02 22:30:06 +0800
committerlulalala <mark@goodlife.tw>2012-10-02 23:49:32 +0800
commit6e56a03f834202af4e57c50a71cc74ea08303bfd (patch)
treee3d60012629b06078cbda72e5f1d0130a01900bc /activerecord/test/schema
parent8ea88c3b74a20b56d39ab820244e0b3806a84169 (diff)
downloadrails-6e56a03f834202af4e57c50a71cc74ea08303bfd.tar.gz
rails-6e56a03f834202af4e57c50a71cc74ea08303bfd.tar.bz2
rails-6e56a03f834202af4e57c50a71cc74ea08303bfd.zip
Fix reset_counters() crashing on has_many :through associations.
The counter column name in the intermediate model need to be access via the through reflection.
Diffstat (limited to 'activerecord/test/schema')
-rw-r--r--activerecord/test/schema/schema.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb
index 798ea20efc..2e4ec96933 100644
--- a/activerecord/test/schema/schema.rb
+++ b/activerecord/test/schema/schema.rb
@@ -621,6 +621,7 @@ ActiveRecord::Schema.define do
create_table :subscribers, :force => true, :id => false do |t|
t.string :nick, :null => false
t.string :name
+ t.column :books_count, :integer, :null => false, :default => 0
end
add_index :subscribers, :nick, :unique => true