aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/contact.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-02-01 11:30:09 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2011-02-01 14:25:46 -0800
commitee34b4cf346975d0aef7f26ef47ee2e4f3e13c37 (patch)
treea1e6cd21828eb2c70ef7312500f3cb6c147408af /activerecord/test/models/contact.rb
parenta6cf6ec98b58dc2a7d0586ccb6ef970d93f0bafc (diff)
downloadrails-ee34b4cf346975d0aef7f26ef47ee2e4f3e13c37.tar.gz
rails-ee34b4cf346975d0aef7f26ef47ee2e4f3e13c37.tar.bz2
rails-ee34b4cf346975d0aef7f26ef47ee2e4f3e13c37.zip
share column cache among subclasses, only look up columns per AR::Base subclass once
Diffstat (limited to 'activerecord/test/models/contact.rb')
-rw-r--r--activerecord/test/models/contact.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/models/contact.rb b/activerecord/test/models/contact.rb
index 975a885331..5bbe7ebb12 100644
--- a/activerecord/test/models/contact.rb
+++ b/activerecord/test/models/contact.rb
@@ -1,4 +1,8 @@
class Contact < ActiveRecord::Base
+ def self.columns
+ @columns
+ end
+
# mock out self.columns so no pesky db is needed for these tests
def self.column(name, sql_type = nil, options = {})
@columns ||= []