aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/fixtures
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2008-03-21 18:09:03 +0000
committerRick Olson <technoweenie@gmail.com>2008-03-21 18:09:03 +0000
commit273b21faa911681ed4b6c748676146e0f6eed0a0 (patch)
tree7454ae8ead82fbe980c9f3630289c672f247b232 /activerecord/test/fixtures
parentd8f76e66a19435239eec6f65f910133c6059cd60 (diff)
downloadrails-273b21faa911681ed4b6c748676146e0f6eed0a0.tar.gz
rails-273b21faa911681ed4b6c748676146e0f6eed0a0.tar.bz2
rails-273b21faa911681ed4b6c748676146e0f6eed0a0.zip
Add has_one :through support, finally. Closes #4756 [thechrisoshow]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9067 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/fixtures')
-rw-r--r--activerecord/test/fixtures/clubs.yml6
-rw-r--r--activerecord/test/fixtures/members.yml4
-rw-r--r--activerecord/test/fixtures/memberships.yml20
-rw-r--r--activerecord/test/fixtures/sponsors.yml3
4 files changed, 33 insertions, 0 deletions
diff --git a/activerecord/test/fixtures/clubs.yml b/activerecord/test/fixtures/clubs.yml
new file mode 100644
index 0000000000..1986d28229
--- /dev/null
+++ b/activerecord/test/fixtures/clubs.yml
@@ -0,0 +1,6 @@
+boring_club:
+ name: Banana appreciation society
+moustache_club:
+ name: Moustache and Eyebrow Fancier Club
+crazy_club:
+ name: Skull and bones \ No newline at end of file
diff --git a/activerecord/test/fixtures/members.yml b/activerecord/test/fixtures/members.yml
new file mode 100644
index 0000000000..67a6cc459a
--- /dev/null
+++ b/activerecord/test/fixtures/members.yml
@@ -0,0 +1,4 @@
+groucho:
+ name: Groucho Marx
+some_other_guy:
+ name: Englebert Humperdink \ No newline at end of file
diff --git a/activerecord/test/fixtures/memberships.yml b/activerecord/test/fixtures/memberships.yml
new file mode 100644
index 0000000000..99fbe46d9b
--- /dev/null
+++ b/activerecord/test/fixtures/memberships.yml
@@ -0,0 +1,20 @@
+membership_of_boring_club:
+ joined_on: <%= 3.weeks.ago.to_s(:db) %>
+ club: boring_club
+ member: groucho
+ favourite: false
+ type: CurrentMembership
+
+membership_of_favourite_club:
+ joined_on: <%= 3.weeks.ago.to_s(:db) %>
+ club: moustache_club
+ member: groucho
+ favourite: true
+ type: Membership
+
+other_guys_membership:
+ joined_on: <%= 4.weeks.ago.to_s(:db) %>
+ club: boring_club
+ member: some_other_guy
+ favourite: false
+ type: CurrentMembership
diff --git a/activerecord/test/fixtures/sponsors.yml b/activerecord/test/fixtures/sponsors.yml
new file mode 100644
index 0000000000..c116df0534
--- /dev/null
+++ b/activerecord/test/fixtures/sponsors.yml
@@ -0,0 +1,3 @@
+moustache_club_sponsor_for_groucho:
+ sponsor_club: moustache_club
+ sponsorable: groucho (Member) \ No newline at end of file