aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/author.rb4
-rw-r--r--activerecord/test/models/contact.rb4
2 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/test/models/author.rb b/activerecord/test/models/author.rb
index 025f6207f8..655b45bf57 100644
--- a/activerecord/test/models/author.rb
+++ b/activerecord/test/models/author.rb
@@ -104,6 +104,10 @@ class Author < ActiveRecord::Base
"#{id}-#{name}"
end
+ def social
+ %w(twitter github)
+ end
+
private
def log_before_adding(object)
@post_log << "before_adding#{object.id || '<new>'}"
diff --git a/activerecord/test/models/contact.rb b/activerecord/test/models/contact.rb
index dbfa57bf49..975a885331 100644
--- a/activerecord/test/models/contact.rb
+++ b/activerecord/test/models/contact.rb
@@ -13,4 +13,6 @@ class Contact < ActiveRecord::Base
column :preferences, :string
serialize :preferences
-end \ No newline at end of file
+
+ belongs_to :alternative, :class_name => 'Contact'
+end