has_many_polymorphs 2.11 → 2.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. data.tar.gz.sig +0 -0
  2. data/CHANGELOG +3 -1
  3. data/Manifest +43 -61
  4. data/README +30 -0
  5. data/TODO +0 -3
  6. data/generators/tagging/tagging_generator.rb +2 -0
  7. data/generators/tagging/templates/tag_test.rb +7 -2
  8. data/generators/tagging/templates/tagging.rb +2 -2
  9. data/generators/tagging/templates/tagging_extensions.rb +49 -2
  10. data/generators/tagging/templates/tagging_test.rb +32 -9
  11. data/generators/tagging/templates/tags.yml +2 -2
  12. data/has_many_polymorphs.gemspec +20 -13
  13. data/lib/has_many_polymorphs.rb +0 -1
  14. data/lib/has_many_polymorphs/autoload.rb +45 -37
  15. data/lib/has_many_polymorphs/class_methods.rb +2 -15
  16. data/lib/has_many_polymorphs/configuration.rb +2 -2
  17. data/lib/has_many_polymorphs/rake_task_redefine_task.rb +9 -1
  18. data/test/generator/tagging_generator_test.rb +42 -0
  19. data/test/integration/app/app/controllers/bones_controller.rb +5 -0
  20. data/test/integration/app/app/helpers/bones_helper.rb +2 -0
  21. data/test/integration/app/app/models/bone.rb +2 -0
  22. data/test/integration/app/app/models/double_sti_parent.rb +2 -0
  23. data/test/integration/app/app/models/double_sti_parent_relationship.rb +2 -0
  24. data/test/integration/app/app/models/organic_substance.rb +2 -0
  25. data/test/integration/app/app/models/single_sti_parent.rb +4 -0
  26. data/test/integration/app/app/models/single_sti_parent_relationship.rb +4 -0
  27. data/test/integration/app/app/models/stick.rb +2 -0
  28. data/test/integration/app/app/models/stone.rb +2 -0
  29. data/test/integration/app/app/views/bones/index.rhtml +5 -0
  30. data/test/integration/app/config/boot.rb +97 -32
  31. data/test/integration/app/config/database.yml +8 -12
  32. data/test/integration/app/config/environment.rb +9 -3
  33. data/test/integration/app/config/environment.rb.canonical +19 -0
  34. data/test/integration/app/config/environments/development.rb +6 -5
  35. data/test/integration/app/db/migrate/001_create_sticks.rb +11 -0
  36. data/test/integration/app/db/migrate/002_create_stones.rb +11 -0
  37. data/test/integration/app/db/migrate/003_create_organic_substances.rb +11 -0
  38. data/test/integration/app/db/migrate/004_create_bones.rb +8 -0
  39. data/test/integration/app/db/migrate/005_create_single_sti_parents.rb +11 -0
  40. data/test/integration/app/db/migrate/006_create_double_sti_parents.rb +11 -0
  41. data/test/integration/app/db/migrate/007_create_single_sti_parent_relationships.rb +13 -0
  42. data/test/integration/app/db/migrate/008_create_double_sti_parent_relationships.rb +14 -0
  43. data/test/integration/app/db/migrate/009_create_library_model.rb +11 -0
  44. data/test/integration/app/db/schema.rb +21 -121
  45. data/test/integration/app/hmp_development +0 -0
  46. data/test/integration/app/lib/library_model.rb +2 -0
  47. data/test/integration/app/test/fixtures/double_sti_parent_relationships.yml +7 -0
  48. data/test/integration/app/test/fixtures/double_sti_parents.yml +7 -0
  49. data/test/integration/app/test/fixtures/organic_substances.yml +5 -0
  50. data/test/integration/app/test/fixtures/single_sti_parent_relationships.yml +7 -0
  51. data/test/integration/app/test/fixtures/single_sti_parents.yml +7 -0
  52. data/test/integration/app/test/fixtures/sticks.yml +7 -0
  53. data/test/integration/app/test/fixtures/stones.yml +7 -0
  54. data/test/integration/app/test/{unit/user_test.rb → functional/bones_controller_test.rb} +1 -3
  55. data/test/integration/app/test/test_helper.rb +1 -21
  56. data/test/integration/app/test/unit/{state_test.rb → bone_test.rb} +1 -3
  57. data/test/integration/app/test/unit/{seller_test.rb → double_sti_parent_relationship_test.rb} +1 -3
  58. data/test/integration/app/test/unit/{address_test.rb → double_sti_parent_test.rb} +1 -3
  59. data/test/integration/app/test/unit/organic_substance_test.rb +8 -0
  60. data/test/integration/app/test/unit/single_sti_parent_relationship_test.rb +8 -0
  61. data/test/integration/app/test/unit/single_sti_parent_test.rb +8 -0
  62. data/test/integration/app/test/unit/stick_test.rb +8 -0
  63. data/test/integration/app/test/unit/stone_test.rb +8 -0
  64. data/test/integration/server_test.rb +43 -0
  65. data/test/patches/symlinked_plugins_1.2.6.diff +46 -0
  66. data/test/setup.rb +6 -2
  67. data/test/test_helper.rb +32 -16
  68. data/test/unit/{polymorph_test.rb → has_many_polymorphs_test.rb} +16 -16
  69. metadata +49 -65
  70. metadata.gz.sig +0 -0
  71. data/generators/commenting/commenting_generator.rb +0 -94
  72. data/generators/commenting/templates/comment.rb +0 -33
  73. data/generators/commenting/templates/comment_test.rb +0 -12
  74. data/generators/commenting/templates/commenting.rb +0 -13
  75. data/generators/commenting/templates/commenting_extensions.rb +0 -30
  76. data/generators/commenting/templates/commenting_test.rb +0 -30
  77. data/generators/commenting/templates/commentings.yml +0 -23
  78. data/generators/commenting/templates/comments.yml +0 -13
  79. data/generators/commenting/templates/migration.rb +0 -28
  80. data/lib/has_many_polymorphs/dependencies.rb +0 -41
  81. data/test/integration/app/app/controllers/addresses_controller.rb +0 -85
  82. data/test/integration/app/app/controllers/sellers_controller.rb +0 -85
  83. data/test/integration/app/app/controllers/states_controller.rb +0 -85
  84. data/test/integration/app/app/controllers/users_controller.rb +0 -85
  85. data/test/integration/app/app/models/address.rb +0 -4
  86. data/test/integration/app/app/models/citation.rb +0 -3
  87. data/test/integration/app/app/models/citations_item.rb +0 -4
  88. data/test/integration/app/app/models/seller.rb +0 -4
  89. data/test/integration/app/app/models/state.rb +0 -3
  90. data/test/integration/app/app/models/user.rb +0 -4
  91. data/test/integration/app/db/migrate/001_create_users.rb +0 -16
  92. data/test/integration/app/db/migrate/002_create_sellers.rb +0 -14
  93. data/test/integration/app/db/migrate/003_create_addresses.rb +0 -19
  94. data/test/integration/app/db/migrate/004_create_states.rb +0 -12
  95. data/test/integration/app/db/migrate/005_add_capitalization_to_seller.rb +0 -9
  96. data/test/integration/app/db/migrate/006_add_deleted_to_user.rb +0 -9
  97. data/test/integration/app/db/migrate/007_add_lat_and_long_to_address.rb +0 -11
  98. data/test/integration/app/db/migrate/008_create_citations.rb +0 -12
  99. data/test/integration/app/db/migrate/009_create_citations_items.rb +0 -14
  100. data/test/integration/app/generated_models/aquatic_fish.rb +0 -109
  101. data/test/integration/app/generated_models/aquatic_pupils_whale.rb +0 -13
  102. data/test/integration/app/generated_models/aquatic_whale.rb +0 -42
  103. data/test/integration/app/generated_models/beautiful_fight_relationship.rb +0 -25
  104. data/test/integration/app/generated_models/citation.rb +0 -40
  105. data/test/integration/app/generated_models/citations_item.rb +0 -12
  106. data/test/integration/app/generated_models/dog.rb +0 -183
  107. data/test/integration/app/generated_models/eaters_foodstuff.rb +0 -13
  108. data/test/integration/app/generated_models/frog.rb +0 -78
  109. data/test/integration/app/generated_models/kitten.rb +0 -161
  110. data/test/integration/app/generated_models/parentship.rb +0 -14
  111. data/test/integration/app/generated_models/person.rb +0 -53
  112. data/test/integration/app/generated_models/petfood.rb +0 -125
  113. data/test/integration/app/generated_models/polymorph_test_some_model.rb +0 -25
  114. data/test/integration/app/generated_models/seller.rb +0 -30
  115. data/test/integration/app/generated_models/tabby.rb +0 -26
  116. data/test/integration/app/generated_models/user.rb +0 -34
  117. data/test/integration/app/generated_models/wild_boar.rb +0 -87
  118. data/test/integration/app/test/fixtures/addresses.yml +0 -13
  119. data/test/integration/app/test/fixtures/citations.yml +0 -9
  120. data/test/integration/app/test/fixtures/citations_items.yml +0 -9
  121. data/test/integration/app/test/fixtures/sellers.yml +0 -10
  122. data/test/integration/app/test/fixtures/states.yml +0 -216
  123. data/test/integration/app/test/fixtures/users.yml +0 -11
  124. data/test/integration/app/test/unit/citation_test.rb +0 -10
  125. data/test/integration/app/test/unit/citations_item_test.rb +0 -10
  126. data/test/test_all.rb +0 -16
@@ -1,13 +0,0 @@
1
-
2
- class Aquatic::PupilsWhale
3
-
4
- belongs_to :whale,
5
- :foreign_key => "whale_id",
6
- :class_name => "Aquatic::Whale"
7
- # called from line 57
8
-
9
- belongs_to :aquatic_pupil,
10
- :polymorphic => true
11
- # called from line 57
12
-
13
- end
@@ -1,42 +0,0 @@
1
-
2
- class Aquatic::Whale
3
-
4
- has_many_polymorphs :aquatic_pupils,
5
- :through => "aquatic/pupils_whales",
6
- :from => [:dogs,
7
- :"aquatic/fish"]
8
- #<Proc:0x03c2588c@whale.rb:9>
9
- # called from line 57
10
-
11
- has_many :aquatic_pupils_whales,
12
- :extend => [],
13
- :dependent => :destroy,
14
- :foreign_key => "whale_id",
15
- :class_name => "Aquatic::PupilsWhale"
16
- # called from line 57
17
-
18
- has_many :aquatic_fish,
19
- :source => :aquatic_pupil,
20
- :extend => [Aquatic::WhaleAquaticFishPolymorphicChildAssociationExtension, Aquatic::WhaleAquaticPupilPolymorphicAssociationExtension0],
21
- :limit => nil,
22
- :through => :aquatic_pupils_whales,
23
- :group => nil,
24
- :conditions => nil,
25
- :source_type => "Aquatic::Fish",
26
- :class_name => "Aquatic::Fish",
27
- :order => nil
28
- # called from line 57
29
-
30
- has_many :dogs,
31
- :source => :aquatic_pupil,
32
- :extend => [Aquatic::WhaleDogPolymorphicChildAssociationExtension, Aquatic::WhaleAquaticPupilPolymorphicAssociationExtension0],
33
- :limit => nil,
34
- :through => :aquatic_pupils_whales,
35
- :group => nil,
36
- :conditions => nil,
37
- :source_type => "Dog",
38
- :class_name => "Dog",
39
- :order => nil
40
- # called from line 57
41
-
42
- end
@@ -1,25 +0,0 @@
1
-
2
- class BeautifulFightRelationship
3
-
4
- belongs_to :enemy,
5
- :polymorphic => true
6
- # called from line 57
7
-
8
- belongs_to :protector,
9
- :polymorphic => true
10
- # called from line 57
11
-
12
- acts_as_double_polymorphic_join ,
13
- :enemies => [:dogs,
14
- :kittens,
15
- :frogs],
16
- :join_extend => #<Proc:0x03be672c@/Users/eweaver/Desktop/projects/fauna/has_many_polymorphs/trunk/test/models/beautiful_fight_relationship.rb:20>,
17
- :enemies_extend => [ExtensionModule, #<Proc:0x00000000@/Users/eweaver/Desktop/projects/fauna/has_many_polymorphs/trunk/test/models/beautiful_fight_relationship.rb:14>],
18
- :protectors => [:wild_boars,
19
- :kittens,
20
- :"aquatic/fish",
21
- :dogs],
22
- :protectors_extend => #<Proc:0x03be68bc@/Users/eweaver/Desktop/projects/fauna/has_many_polymorphs/trunk/test/models/beautiful_fight_relationship.rb:15>
23
- # called from line 57
24
-
25
- end
@@ -1,40 +0,0 @@
1
-
2
- class Citation
3
-
4
- has_many_polymorphs :items,
5
- :from => [:users,
6
- :sellers]
7
- # called from line 57
8
-
9
- has_many :citations_items,
10
- :extend => [],
11
- :dependent => :destroy,
12
- :foreign_key => "citation_id",
13
- :class_name => "CitationsItem"
14
- # called from line 57
15
-
16
- has_many :sellers,
17
- :source => :item,
18
- :extend => [Citation::CitationSellerPolymorphicChildAssociationExtension],
19
- :limit => nil,
20
- :through => :citations_items,
21
- :group => nil,
22
- :conditions => nil,
23
- :source_type => "Seller",
24
- :class_name => "Seller",
25
- :order => nil
26
- # called from line 57
27
-
28
- has_many :users,
29
- :source => :item,
30
- :extend => [Citation::CitationUserPolymorphicChildAssociationExtension],
31
- :limit => nil,
32
- :through => :citations_items,
33
- :group => nil,
34
- :conditions => nil,
35
- :source_type => "User",
36
- :class_name => "User",
37
- :order => nil
38
- # called from line 57
39
-
40
- end
@@ -1,12 +0,0 @@
1
-
2
- class CitationsItem
3
-
4
- belongs_to ,
5
- citatio
6
- # called from line 57
7
-
8
- belongs_to :item,
9
- :polymorphic => true
10
- # called from line 57
11
-
12
- end
@@ -1,183 +0,0 @@
1
-
2
- class Dog
3
-
4
- has_many :aquatic_pupils_whales,
5
- :extend => [],
6
- :dependent => :destroy,
7
- :conditions => nil,
8
- :as => :aquatic_pupil,
9
- :class_name => "Aquatic::PupilsWhale",
10
- :order => nil
11
- # called from line 57
12
-
13
- has_many :whales,
14
- :source => :whale,
15
- :extend => [],
16
- :foreign_key => "whale_id",
17
- :limit => nil,
18
- :through => :aquatic_pupils_whales,
19
- :group => nil,
20
- :conditions => nil,
21
- :offset => nil,
22
- :class_name => "Aquatic::Whale",
23
- :order => nil
24
- # called from line 57
25
-
26
- has_many_polymorphs :enemies,
27
- :singular_reverse_association_id => :protector,
28
- :extend => [ExtensionModule, #<Proc:0x00000000@/Users/eweaver/Desktop/projects/fauna/has_many_polymorphs/trunk/test/models/beautiful_fight_relationship.rb:14>],
29
- :foreign_key => "protector_id",
30
- :is_double => true,
31
- :from => [:dogs,
32
- :kittens,
33
- :frogs],
34
- :through => :beautiful_fight_relationships,
35
- :foreign_type_key => "protector_type",
36
- :join_extend => [#<Proc:0x03be672c@/Users/eweaver/Desktop/projects/fauna/has_many_polymorphs/trunk/test/models/beautiful_fight_relationship.rb:20>],
37
- :conflicts => [:dogs,
38
- :kittens],
39
- :as => :protector
40
- # called from line 57
41
-
42
- has_many :beautiful_fight_relationships_as_protector,
43
- :extend => [Dog::DogEnemyPolymorphicJoinAssociationExtension0],
44
- :dependent => :destroy,
45
- :foreign_key => "protector_id",
46
- :conditions => "protector_type = 'Dog'",
47
- :as => :protector,
48
- :class_name => "BeautifulFightRelationship"
49
- # called from line 57
50
-
51
- has_many :frogs,
52
- :source => :enemy,
53
- :extend => [Dog::DogFrogPolymorphicChildAssociationExtension, ExtensionModule, Dog::DogEnemyPolymorphicAssociationExtension0],
54
- :limit => nil,
55
- :through => :beautiful_fight_relationships_as_protector,
56
- :group => nil,
57
- :conditions => nil,
58
- :source_type => "Frog",
59
- :class_name => "Frog",
60
- :order => nil
61
- # called from line 57
62
-
63
- has_many :enemy_kittens,
64
- :source => :enemy,
65
- :extend => [Dog::DogEnemyKittenPolymorphicChildAssociationExtension, ExtensionModule, Dog::DogEnemyPolymorphicAssociationExtension0],
66
- :limit => nil,
67
- :through => :beautiful_fight_relationships_as_protector,
68
- :group => nil,
69
- :conditions => nil,
70
- :source_type => "Cat",
71
- :class_name => "Kitten",
72
- :order => nil
73
- # called from line 57
74
-
75
- has_many :enemy_dogs,
76
- :source => :enemy,
77
- :extend => [Dog::DogEnemyDogPolymorphicChildAssociationExtension, ExtensionModule, Dog::DogEnemyPolymorphicAssociationExtension0],
78
- :limit => nil,
79
- :through => :beautiful_fight_relationships_as_protector,
80
- :group => nil,
81
- :conditions => nil,
82
- :source_type => "Dog",
83
- :class_name => "Dog",
84
- :order => nil
85
- # called from line 57
86
-
87
- has_many_polymorphs :protectors,
88
- :singular_reverse_association_id => :enemy,
89
- :extend => #<Proc:0x03be68bc@/Users/eweaver/Desktop/projects/fauna/has_many_polymorphs/trunk/test/models/beautiful_fight_relationship.rb:15>,
90
- :foreign_key => "enemy_id",
91
- :is_double => true,
92
- :from => [:wild_boars,
93
- :kittens,
94
- :"aquatic/fish",
95
- :dogs],
96
- :through => :beautiful_fight_relationships,
97
- :foreign_type_key => "enemy_type",
98
- :join_extend => [#<Proc:0x03be672c@/Users/eweaver/Desktop/projects/fauna/has_many_polymorphs/trunk/test/models/beautiful_fight_relationship.rb:20>],
99
- :conflicts => [:kittens,
100
- :dogs],
101
- :as => :enemy
102
- # called from line 57
103
-
104
- has_many :beautiful_fight_relationships_as_enemy,
105
- :extend => [Dog::DogProtectorPolymorphicJoinAssociationExtension0],
106
- :dependent => :destroy,
107
- :foreign_key => "enemy_id",
108
- :conditions => "enemy_type = 'Dog'",
109
- :as => :enemy,
110
- :class_name => "BeautifulFightRelationship"
111
- # called from line 57
112
-
113
- has_many :protector_kittens,
114
- :source => :protector,
115
- :extend => [Dog::DogProtectorKittenPolymorphicChildAssociationExtension, Dog::DogProtectorPolymorphicAssociationExtension0],
116
- :limit => nil,
117
- :through => :beautiful_fight_relationships_as_enemy,
118
- :group => nil,
119
- :conditions => nil,
120
- :source_type => "Cat",
121
- :class_name => "Kitten",
122
- :order => nil
123
- # called from line 57
124
-
125
- has_many :aquatic_fish,
126
- :source => :protector,
127
- :extend => [Dog::DogAquaticFishPolymorphicChildAssociationExtension, Dog::DogProtectorPolymorphicAssociationExtension0],
128
- :limit => nil,
129
- :through => :beautiful_fight_relationships_as_enemy,
130
- :group => nil,
131
- :conditions => nil,
132
- :source_type => "Aquatic::Fish",
133
- :class_name => "Aquatic::Fish",
134
- :order => nil
135
- # called from line 57
136
-
137
- has_many :wild_boars,
138
- :source => :protector,
139
- :extend => [Dog::DogWildBoarPolymorphicChildAssociationExtension, Dog::DogProtectorPolymorphicAssociationExtension0],
140
- :limit => nil,
141
- :through => :beautiful_fight_relationships_as_enemy,
142
- :group => nil,
143
- :conditions => nil,
144
- :source_type => "WildBoar",
145
- :class_name => "WildBoar",
146
- :order => nil
147
- # called from line 57
148
-
149
- has_many :protector_dogs,
150
- :source => :protector,
151
- :extend => [Dog::DogProtectorDogPolymorphicChildAssociationExtension, Dog::DogProtectorPolymorphicAssociationExtension0],
152
- :limit => nil,
153
- :through => :beautiful_fight_relationships_as_enemy,
154
- :group => nil,
155
- :conditions => nil,
156
- :source_type => "Dog",
157
- :class_name => "Dog",
158
- :order => nil
159
- # called from line 57
160
-
161
- has_many :eaters_foodstuffs,
162
- :extend => [Petfood::PetfoodEaterPolymorphicJoinAssociationExtension0],
163
- :dependent => :destroy,
164
- :conditions => "NULL IS NULL OR NULL != 'Snausages'",
165
- :as => :eater,
166
- :class_name => "EatersFoodstuff",
167
- :order => "NULL DESC"
168
- # called from line 57
169
-
170
- has_many :foodstuffs_of_eaters,
171
- :source => :foodstuff,
172
- :extend => [Petfood::PetfoodEaterPolymorphicParentAssociationExtension0],
173
- :foreign_key => "foodstuff_id",
174
- :limit => nil,
175
- :through => :eaters_foodstuffs,
176
- :group => nil,
177
- :conditions => "petfoods.name IS NULL OR petfoods.name != 'Snausages'",
178
- :offset => nil,
179
- :class_name => "Petfood",
180
- :order => "petfoods.the_petfood_primary_key DESC"
181
- # called from line 57
182
-
183
- end
@@ -1,13 +0,0 @@
1
-
2
- class EatersFoodstuff
3
-
4
- belongs_to :foodstuff,
5
- :foreign_key => "foodstuff_id",
6
- :class_name => "Petfood"
7
- # called from line 57
8
-
9
- belongs_to :eater,
10
- :polymorphic => true
11
- # called from line 57
12
-
13
- end
@@ -1,78 +0,0 @@
1
-
2
- class Frog
3
-
4
- has_many_polymorphs :protectors,
5
- :singular_reverse_association_id => :enemy,
6
- :extend => #<Proc:0x03be68bc@/Users/eweaver/Desktop/projects/fauna/has_many_polymorphs/trunk/test/models/beautiful_fight_relationship.rb:15>,
7
- :foreign_key => "enemy_id",
8
- :is_double => true,
9
- :from => [:wild_boars,
10
- :kittens,
11
- :"aquatic/fish",
12
- :dogs],
13
- :through => :beautiful_fight_relationships,
14
- :foreign_type_key => "enemy_type",
15
- :join_extend => [#<Proc:0x03be672c@/Users/eweaver/Desktop/projects/fauna/has_many_polymorphs/trunk/test/models/beautiful_fight_relationship.rb:20>],
16
- :conflicts => [:kittens,
17
- :dogs],
18
- :as => :enemy
19
- # called from line 57
20
-
21
- has_many :beautiful_fight_relationships_as_enemy,
22
- :extend => [Frog::FrogProtectorPolymorphicJoinAssociationExtension0],
23
- :dependent => :destroy,
24
- :foreign_key => "enemy_id",
25
- :conditions => "enemy_type = 'Frog'",
26
- :as => :enemy,
27
- :class_name => "BeautifulFightRelationship"
28
- # called from line 57
29
-
30
- has_many :kittens,
31
- :source => :protector,
32
- :extend => [Frog::FrogKittenPolymorphicChildAssociationExtension, Frog::FrogProtectorPolymorphicAssociationExtension0],
33
- :limit => nil,
34
- :through => :beautiful_fight_relationships_as_enemy,
35
- :group => nil,
36
- :conditions => nil,
37
- :source_type => "Cat",
38
- :class_name => "Kitten",
39
- :order => nil
40
- # called from line 57
41
-
42
- has_many :aquatic_fish,
43
- :source => :protector,
44
- :extend => [Frog::FrogAquaticFishPolymorphicChildAssociationExtension, Frog::FrogProtectorPolymorphicAssociationExtension0],
45
- :limit => nil,
46
- :through => :beautiful_fight_relationships_as_enemy,
47
- :group => nil,
48
- :conditions => nil,
49
- :source_type => "Aquatic::Fish",
50
- :class_name => "Aquatic::Fish",
51
- :order => nil
52
- # called from line 57
53
-
54
- has_many :wild_boars,
55
- :source => :protector,
56
- :extend => [Frog::FrogWildBoarPolymorphicChildAssociationExtension, Frog::FrogProtectorPolymorphicAssociationExtension0],
57
- :limit => nil,
58
- :through => :beautiful_fight_relationships_as_enemy,
59
- :group => nil,
60
- :conditions => nil,
61
- :source_type => "WildBoar",
62
- :class_name => "WildBoar",
63
- :order => nil
64
- # called from line 57
65
-
66
- has_many :dogs,
67
- :source => :protector,
68
- :extend => [Frog::FrogDogPolymorphicChildAssociationExtension, Frog::FrogProtectorPolymorphicAssociationExtension0],
69
- :limit => nil,
70
- :through => :beautiful_fight_relationships_as_enemy,
71
- :group => nil,
72
- :conditions => nil,
73
- :source_type => "Dog",
74
- :class_name => "Dog",
75
- :order => nil
76
- # called from line 57
77
-
78
- end
@@ -1,161 +0,0 @@
1
-
2
- class Kitten
3
-
4
- has_many_polymorphs :enemies,
5
- :singular_reverse_association_id => :protector,
6
- :extend => [ExtensionModule, #<Proc:0x00000000@/Users/eweaver/Desktop/projects/fauna/has_many_polymorphs/trunk/test/models/beautiful_fight_relationship.rb:14>],
7
- :foreign_key => "protector_id",
8
- :is_double => true,
9
- :from => [:dogs,
10
- :kittens,
11
- :frogs],
12
- :through => :beautiful_fight_relationships,
13
- :foreign_type_key => "protector_type",
14
- :join_extend => [#<Proc:0x03be672c@/Users/eweaver/Desktop/projects/fauna/has_many_polymorphs/trunk/test/models/beautiful_fight_relationship.rb:20>],
15
- :conflicts => [:dogs,
16
- :kittens],
17
- :as => :protector
18
- # called from line 57
19
-
20
- has_many :beautiful_fight_relationships_as_protector,
21
- :extend => [Kitten::KittenEnemyPolymorphicJoinAssociationExtension0],
22
- :dependent => :destroy,
23
- :foreign_key => "protector_id",
24
- :conditions => "protector_type = 'Cat'",
25
- :as => :protector,
26
- :class_name => "BeautifulFightRelationship"
27
- # called from line 57
28
-
29
- has_many :frogs,
30
- :source => :enemy,
31
- :extend => [Kitten::KittenFrogPolymorphicChildAssociationExtension, ExtensionModule, Kitten::KittenEnemyPolymorphicAssociationExtension0],
32
- :limit => nil,
33
- :through => :beautiful_fight_relationships_as_protector,
34
- :group => nil,
35
- :conditions => nil,
36
- :source_type => "Frog",
37
- :class_name => "Frog",
38
- :order => nil
39
- # called from line 57
40
-
41
- has_many :enemy_kittens,
42
- :source => :enemy,
43
- :extend => [Kitten::KittenEnemyKittenPolymorphicChildAssociationExtension, ExtensionModule, Kitten::KittenEnemyPolymorphicAssociationExtension0],
44
- :limit => nil,
45
- :through => :beautiful_fight_relationships_as_protector,
46
- :group => nil,
47
- :conditions => nil,
48
- :source_type => "Cat",
49
- :class_name => "Kitten",
50
- :order => nil
51
- # called from line 57
52
-
53
- has_many :enemy_dogs,
54
- :source => :enemy,
55
- :extend => [Kitten::KittenEnemyDogPolymorphicChildAssociationExtension, ExtensionModule, Kitten::KittenEnemyPolymorphicAssociationExtension0],
56
- :limit => nil,
57
- :through => :beautiful_fight_relationships_as_protector,
58
- :group => nil,
59
- :conditions => nil,
60
- :source_type => "Dog",
61
- :class_name => "Dog",
62
- :order => nil
63
- # called from line 57
64
-
65
- has_many_polymorphs :protectors,
66
- :singular_reverse_association_id => :enemy,
67
- :extend => #<Proc:0x03be68bc@/Users/eweaver/Desktop/projects/fauna/has_many_polymorphs/trunk/test/models/beautiful_fight_relationship.rb:15>,
68
- :foreign_key => "enemy_id",
69
- :is_double => true,
70
- :from => [:wild_boars,
71
- :kittens,
72
- :"aquatic/fish",
73
- :dogs],
74
- :through => :beautiful_fight_relationships,
75
- :foreign_type_key => "enemy_type",
76
- :join_extend => [#<Proc:0x03be672c@/Users/eweaver/Desktop/projects/fauna/has_many_polymorphs/trunk/test/models/beautiful_fight_relationship.rb:20>],
77
- :conflicts => [:kittens,
78
- :dogs],
79
- :as => :enemy
80
- # called from line 57
81
-
82
- has_many :beautiful_fight_relationships_as_enemy,
83
- :extend => [Kitten::KittenProtectorPolymorphicJoinAssociationExtension0],
84
- :dependent => :destroy,
85
- :foreign_key => "enemy_id",
86
- :conditions => "enemy_type = 'Cat'",
87
- :as => :enemy,
88
- :class_name => "BeautifulFightRelationship"
89
- # called from line 57
90
-
91
- has_many :protector_kittens,
92
- :source => :protector,
93
- :extend => [Kitten::KittenProtectorKittenPolymorphicChildAssociationExtension, Kitten::KittenProtectorPolymorphicAssociationExtension0],
94
- :limit => nil,
95
- :through => :beautiful_fight_relationships_as_enemy,
96
- :group => nil,
97
- :conditions => nil,
98
- :source_type => "Cat",
99
- :class_name => "Kitten",
100
- :order => nil
101
- # called from line 57
102
-
103
- has_many :aquatic_fish,
104
- :source => :protector,
105
- :extend => [Kitten::KittenAquaticFishPolymorphicChildAssociationExtension, Kitten::KittenProtectorPolymorphicAssociationExtension0],
106
- :limit => nil,
107
- :through => :beautiful_fight_relationships_as_enemy,
108
- :group => nil,
109
- :conditions => nil,
110
- :source_type => "Aquatic::Fish",
111
- :class_name => "Aquatic::Fish",
112
- :order => nil
113
- # called from line 57
114
-
115
- has_many :wild_boars,
116
- :source => :protector,
117
- :extend => [Kitten::KittenWildBoarPolymorphicChildAssociationExtension, Kitten::KittenProtectorPolymorphicAssociationExtension0],
118
- :limit => nil,
119
- :through => :beautiful_fight_relationships_as_enemy,
120
- :group => nil,
121
- :conditions => nil,
122
- :source_type => "WildBoar",
123
- :class_name => "WildBoar",
124
- :order => nil
125
- # called from line 57
126
-
127
- has_many :protector_dogs,
128
- :source => :protector,
129
- :extend => [Kitten::KittenProtectorDogPolymorphicChildAssociationExtension, Kitten::KittenProtectorPolymorphicAssociationExtension0],
130
- :limit => nil,
131
- :through => :beautiful_fight_relationships_as_enemy,
132
- :group => nil,
133
- :conditions => nil,
134
- :source_type => "Dog",
135
- :class_name => "Dog",
136
- :order => nil
137
- # called from line 57
138
-
139
- has_many :eaters_foodstuffs,
140
- :extend => [Petfood::PetfoodEaterPolymorphicJoinAssociationExtension0],
141
- :dependent => :destroy,
142
- :conditions => "NULL IS NULL OR NULL != 'Snausages'",
143
- :as => :eater,
144
- :class_name => "EatersFoodstuff",
145
- :order => "NULL DESC"
146
- # called from line 57
147
-
148
- has_many :foodstuffs_of_eaters,
149
- :source => :foodstuff,
150
- :extend => [Petfood::PetfoodEaterPolymorphicParentAssociationExtension0],
151
- :foreign_key => "foodstuff_id",
152
- :limit => nil,
153
- :through => :eaters_foodstuffs,
154
- :group => nil,
155
- :conditions => "petfoods.name IS NULL OR petfoods.name != 'Snausages'",
156
- :offset => nil,
157
- :class_name => "Petfood",
158
- :order => "petfoods.the_petfood_primary_key DESC"
159
- # called from line 57
160
-
161
- end