inverse_of 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +0,0 @@
1
- boring_club:
2
- name: Banana appreciation society
3
- moustache_club:
4
- name: Moustache and Eyebrow Fancier Club
5
- crazy_club:
6
- name: Skull and bones
@@ -1,11 +0,0 @@
1
- trusting:
2
- description: trusting
3
- man: gordon
4
-
5
- weather_beaten:
6
- description: weather beaten
7
- man: steve
8
-
9
- confused:
10
- description: confused
11
- polymorphic_man: gordon (Man)
@@ -1,33 +0,0 @@
1
- trainspotting:
2
- topic: Trainspotting
3
- zine: staying_in
4
- man: gordon
5
-
6
- birdwatching:
7
- topic: Birdwatching
8
- zine: staying_in
9
- man: gordon
10
-
11
- stamp_collecting:
12
- topic: Stamp Collecting
13
- zine: staying_in
14
- man: gordon
15
-
16
- hunting:
17
- topic: Hunting
18
- zine: going_out
19
- man: steve
20
-
21
- woodsmanship:
22
- topic: Woodsmanship
23
- zine: going_out
24
- man: steve
25
-
26
- survival:
27
- topic: Survival
28
- zine: going_out
29
- man: steve
30
-
31
- llama_wrangling:
32
- topic: Llama Wrangling
33
- polymorphic_man: gordon (Man)
@@ -1,5 +0,0 @@
1
- gordon:
2
- name: Gordon
3
-
4
- steve:
5
- name: Steve
@@ -1,9 +0,0 @@
1
- moustache_club_sponsor_for_groucho:
2
- sponsor_club: moustache_club
3
- sponsorable: groucho (Member)
4
- boring_club_sponsor_for_groucho:
5
- sponsor_club: boring_club
6
- sponsorable: some_other_guy (Member)
7
- crazy_club_sponsor_for_groucho:
8
- sponsor_club: crazy_club
9
- sponsorable: some_other_guy (Member)
@@ -1,5 +0,0 @@
1
- staying_in:
2
- title: Staying in '08
3
-
4
- going_out:
5
- title: Outdoor Pursuits 2k+8
@@ -1,13 +0,0 @@
1
- class Club < ActiveRecord::Base
2
- has_many :memberships
3
- has_many :members, :through => :memberships
4
- has_many :current_memberships
5
- has_one :sponsor
6
- has_one :sponsored_member, :through => :sponsor, :source => :sponsorable, :source_type => "Member"
7
-
8
- private
9
-
10
- def private_method
11
- "I'm sorry sir, this is a *private* club, not a *pirate* club"
12
- end
13
- end
@@ -1,7 +0,0 @@
1
- class Face < ActiveRecord::Base
2
- belongs_to :man, :inverse_of => :face
3
- belongs_to :polymorphic_man, :polymorphic => true, :inverse_of => :polymorphic_face
4
- # These is a "broken" inverse_of for the purposes of testing
5
- belongs_to :horrible_man, :class_name => 'Man', :inverse_of => :horrible_face
6
- belongs_to :horrible_polymorphic_man, :polymorphic => true, :inverse_of => :horrible_polymorphic_face
7
- end
@@ -1,5 +0,0 @@
1
- class Interest < ActiveRecord::Base
2
- belongs_to :man, :inverse_of => :interests
3
- belongs_to :polymorphic_man, :polymorphic => true, :inverse_of => :polymorphic_interests
4
- belongs_to :zine, :inverse_of => :interests
5
- end
@@ -1,9 +0,0 @@
1
- class Man < ActiveRecord::Base
2
- has_one :face, :inverse_of => :man
3
- has_one :polymorphic_face, :class_name => 'Face', :as => :polymorphic_man, :inverse_of => :polymorphic_man
4
- has_many :interests, :inverse_of => :man
5
- has_many :polymorphic_interests, :class_name => 'Interest', :as => :polymorphic_man, :inverse_of => :polymorphic_man
6
- # These are "broken" inverse_of associations for the purposes of testing
7
- has_one :dirty_face, :class_name => 'Face', :inverse_of => :dirty_man
8
- has_many :secret_interests, :class_name => 'Interest', :inverse_of => :secret_man
9
- end
@@ -1,4 +0,0 @@
1
- class Sponsor < ActiveRecord::Base
2
- belongs_to :sponsor_club, :class_name => "Club", :foreign_key => "club_id"
3
- belongs_to :sponsorable, :polymorphic => true
4
- end
@@ -1,3 +0,0 @@
1
- class Zine < ActiveRecord::Base
2
- has_many :interests, :inverse_of => :zine
3
- end
@@ -1,32 +0,0 @@
1
- create_table :clubs, :force => true do |t|
2
- t.string :name
3
- end
4
-
5
- create_table :sponsors, :force => true do |t|
6
- t.integer :club_id
7
- t.integer :sponsorable_id
8
- t.string :sponsorable_type
9
- end
10
-
11
- create_table :men, :force => true do |t|
12
- t.string :name
13
- end
14
-
15
- create_table :faces, :force => true do |t|
16
- t.string :description
17
- t.integer :man_id
18
- t.integer :polymorphic_man_id
19
- t.string :polymorphic_man_type
20
- end
21
-
22
- create_table :interests, :force => true do |t|
23
- t.string :topic
24
- t.integer :man_id
25
- t.integer :polymorphic_man_id
26
- t.string :polymorphic_man_type
27
- t.integer :zine_id
28
- end
29
-
30
- create_table :zines, :force => true do |t|
31
- t.string :title
32
- end
@@ -1 +0,0 @@
1
- # Uninstall hook code here