has_many_polymorphs 2.10 → 2.11
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/CHANGELOG +2 -0
- data/Manifest +191 -56
- data/TODO +1 -0
- data/examples/hmph.rb +69 -0
- data/generators/commenting/commenting_generator.rb +94 -0
- data/generators/commenting/templates/comment.rb +33 -0
- data/generators/commenting/templates/comment_test.rb +12 -0
- data/generators/commenting/templates/commenting.rb +13 -0
- data/generators/commenting/templates/commenting_extensions.rb +30 -0
- data/generators/commenting/templates/commenting_test.rb +30 -0
- data/generators/commenting/templates/commentings.yml +23 -0
- data/generators/commenting/templates/comments.yml +13 -0
- data/generators/commenting/templates/migration.rb +28 -0
- data/generators/tagging/templates/tagging_extensions.rb +4 -8
- data/has_many_polymorphs.gemspec +19 -12
- data/lib/has_many_polymorphs.rb +3 -4
- data/lib/has_many_polymorphs/autoload.rb +4 -4
- data/lib/has_many_polymorphs/class_methods.rb +8 -8
- data/lib/has_many_polymorphs/debugging_tools.rb +2 -0
- data/lib/has_many_polymorphs/dependencies.rb +9 -4
- data/lib/has_many_polymorphs/support_methods.rb +3 -1
- data/test/fixtures/{aquatic/fish.yml → fish.yml} +0 -0
- data/test/fixtures/{aquatic/little_whale_pupils.yml → little_whale_pupils.yml} +0 -0
- data/test/fixtures/{aquatic/whales.yml → whales.yml} +0 -0
- data/test/integration/app/README +182 -0
- data/test/integration/app/Rakefile +19 -0
- data/test/integration/app/app/controllers/addresses_controller.rb +85 -0
- data/test/integration/app/app/controllers/application.rb +7 -0
- data/test/integration/app/app/controllers/sellers_controller.rb +85 -0
- data/test/integration/app/app/controllers/states_controller.rb +85 -0
- data/test/integration/app/app/controllers/users_controller.rb +85 -0
- data/test/integration/app/app/helpers/addresses_helper.rb +2 -0
- data/test/integration/app/app/helpers/application_helper.rb +3 -0
- data/test/integration/app/app/helpers/sellers_helper.rb +28 -0
- data/test/integration/app/app/helpers/states_helper.rb +2 -0
- data/test/integration/app/app/helpers/users_helper.rb +2 -0
- data/test/integration/app/app/models/address.rb +4 -0
- data/test/integration/app/app/models/citation.rb +3 -0
- data/test/integration/app/app/models/citations_item.rb +4 -0
- data/test/integration/app/app/models/seller.rb +4 -0
- data/test/integration/app/app/models/state.rb +3 -0
- data/test/integration/app/app/models/user.rb +4 -0
- data/test/integration/app/app/views/addresses/edit.html.erb +12 -0
- data/test/integration/app/app/views/addresses/index.html.erb +18 -0
- data/test/integration/app/app/views/addresses/new.html.erb +11 -0
- data/test/integration/app/app/views/addresses/show.html.erb +3 -0
- data/test/integration/app/app/views/layouts/addresses.html.erb +17 -0
- data/test/integration/app/app/views/layouts/sellers.html.erb +17 -0
- data/test/integration/app/app/views/layouts/states.html.erb +17 -0
- data/test/integration/app/app/views/layouts/users.html.erb +17 -0
- data/test/integration/app/app/views/sellers/edit.html.erb +12 -0
- data/test/integration/app/app/views/sellers/index.html.erb +20 -0
- data/test/integration/app/app/views/sellers/new.html.erb +11 -0
- data/test/integration/app/app/views/sellers/show.html.erb +3 -0
- data/test/integration/app/app/views/states/edit.html.erb +12 -0
- data/test/integration/app/app/views/states/index.html.erb +19 -0
- data/test/integration/app/app/views/states/new.html.erb +11 -0
- data/test/integration/app/app/views/states/show.html.erb +3 -0
- data/test/integration/app/app/views/users/edit.html.erb +12 -0
- data/test/integration/app/app/views/users/index.html.erb +22 -0
- data/test/integration/app/app/views/users/new.html.erb +11 -0
- data/test/integration/app/app/views/users/show.html.erb +3 -0
- data/test/integration/app/config/boot.rb +45 -0
- data/test/integration/app/config/database.yml +21 -0
- data/test/integration/app/config/environment.rb +13 -0
- data/test/integration/app/config/environments/development.rb +7 -0
- data/test/integration/app/config/environments/production.rb +18 -0
- data/test/integration/app/config/environments/test.rb +19 -0
- data/test/integration/app/config/locomotive.yml +6 -0
- data/test/integration/app/config/routes.rb +33 -0
- data/test/integration/app/config/ultrasphinx/default.base +56 -0
- data/test/integration/app/config/ultrasphinx/development.conf.canonical +155 -0
- data/test/integration/app/db/migrate/001_create_users.rb +16 -0
- data/test/integration/app/db/migrate/002_create_sellers.rb +14 -0
- data/test/integration/app/db/migrate/003_create_addresses.rb +19 -0
- data/test/integration/app/db/migrate/004_create_states.rb +12 -0
- data/test/integration/app/db/migrate/005_add_capitalization_to_seller.rb +9 -0
- data/test/integration/app/db/migrate/006_add_deleted_to_user.rb +9 -0
- data/test/integration/app/db/migrate/007_add_lat_and_long_to_address.rb +11 -0
- data/test/integration/app/db/migrate/008_create_citations.rb +12 -0
- data/test/integration/app/db/migrate/009_create_citations_items.rb +14 -0
- data/test/integration/app/db/schema.rb +144 -0
- data/test/integration/app/doc/README_FOR_APP +2 -0
- data/test/integration/app/generated_models/aquatic_fish.rb +109 -0
- data/test/integration/app/generated_models/aquatic_pupils_whale.rb +13 -0
- data/test/integration/app/generated_models/aquatic_whale.rb +42 -0
- data/test/integration/app/generated_models/beautiful_fight_relationship.rb +25 -0
- data/test/integration/app/generated_models/citation.rb +40 -0
- data/test/integration/app/generated_models/citations_item.rb +12 -0
- data/test/integration/app/generated_models/dog.rb +183 -0
- data/test/integration/app/generated_models/eaters_foodstuff.rb +13 -0
- data/test/integration/app/generated_models/frog.rb +78 -0
- data/test/integration/app/generated_models/kitten.rb +161 -0
- data/test/integration/app/generated_models/parentship.rb +14 -0
- data/test/integration/app/generated_models/person.rb +53 -0
- data/test/integration/app/generated_models/petfood.rb +125 -0
- data/test/integration/app/generated_models/polymorph_test_some_model.rb +25 -0
- data/test/integration/app/generated_models/seller.rb +30 -0
- data/test/integration/app/generated_models/tabby.rb +26 -0
- data/test/integration/app/generated_models/user.rb +34 -0
- data/test/integration/app/generated_models/wild_boar.rb +87 -0
- data/test/integration/app/generators/commenting_generator_test.rb +83 -0
- data/test/integration/app/public/404.html +30 -0
- data/test/integration/app/public/500.html +30 -0
- data/test/integration/app/public/dispatch.cgi +10 -0
- data/test/integration/app/public/dispatch.fcgi +24 -0
- data/test/integration/app/public/dispatch.rb +10 -0
- data/test/integration/app/public/favicon.ico +0 -0
- data/test/integration/app/public/images/rails.png +0 -0
- data/test/integration/app/public/index.html +277 -0
- data/test/integration/app/public/javascripts/application.js +2 -0
- data/test/integration/app/public/javascripts/controls.js +833 -0
- data/test/integration/app/public/javascripts/dragdrop.js +942 -0
- data/test/integration/app/public/javascripts/effects.js +1088 -0
- data/test/integration/app/public/javascripts/prototype.js +2515 -0
- data/test/integration/app/public/robots.txt +1 -0
- data/test/integration/app/public/stylesheets/scaffold.css +74 -0
- data/test/integration/app/script/about +3 -0
- data/test/integration/app/script/breakpointer +3 -0
- data/test/integration/app/script/console +3 -0
- data/test/integration/app/script/destroy +3 -0
- data/test/integration/app/script/generate +3 -0
- data/test/integration/app/script/performance/benchmarker +3 -0
- data/test/integration/app/script/performance/profiler +3 -0
- data/test/integration/app/script/plugin +3 -0
- data/test/integration/app/script/process/inspector +3 -0
- data/test/integration/app/script/process/reaper +3 -0
- data/test/integration/app/script/process/spawner +3 -0
- data/test/integration/app/script/runner +3 -0
- data/test/integration/app/script/server +3 -0
- data/test/integration/app/test/fixtures/addresses.yml +13 -0
- data/test/integration/app/test/fixtures/citations.yml +9 -0
- data/test/integration/app/test/fixtures/citations_items.yml +9 -0
- data/test/integration/app/test/fixtures/sellers.yml +10 -0
- data/test/integration/app/test/fixtures/states.yml +216 -0
- data/test/integration/app/test/fixtures/users.yml +11 -0
- data/test/integration/app/test/functional/addresses_controller_test.rb +57 -0
- data/test/integration/app/test/functional/sellers_controller_test.rb +57 -0
- data/test/integration/app/test/functional/states_controller_test.rb +57 -0
- data/test/integration/app/test/functional/users_controller_test.rb +57 -0
- data/test/integration/app/test/test_helper.rb +28 -0
- data/test/integration/app/test/unit/address_test.rb +10 -0
- data/test/integration/app/test/unit/citation_test.rb +10 -0
- data/test/integration/app/test/unit/citations_item_test.rb +10 -0
- data/test/integration/app/test/unit/seller_test.rb +10 -0
- data/test/integration/app/test/unit/state_test.rb +10 -0
- data/test/integration/app/test/unit/user_test.rb +10 -0
- data/test/models/aquatic/fish.rb +2 -1
- data/test/models/aquatic/whale.rb +2 -0
- data/test/setup.rb +10 -0
- data/test/test_all.rb +16 -0
- data/test/test_helper.rb +16 -12
- data/test/unit/polymorph_test.rb +35 -34
- metadata +239 -98
- metadata.gz.sig +0 -0
@@ -0,0 +1,109 @@
|
|
1
|
+
|
2
|
+
class Aquatic::Fish
|
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 => [Aquatic::FishEnemyPolymorphicJoinAssociationExtension0],
|
44
|
+
:dependent => :destroy,
|
45
|
+
:foreign_key => "protector_id",
|
46
|
+
:conditions => "protector_type = 'Aquatic::Fish'",
|
47
|
+
:as => :protector,
|
48
|
+
:class_name => "BeautifulFightRelationship"
|
49
|
+
# called from line 57
|
50
|
+
|
51
|
+
has_many :frogs,
|
52
|
+
:source => :enemy,
|
53
|
+
:extend => [Aquatic::FishFrogPolymorphicChildAssociationExtension, ExtensionModule, Aquatic::FishEnemyPolymorphicAssociationExtension0],
|
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 :kittens,
|
64
|
+
:source => :enemy,
|
65
|
+
:extend => [Aquatic::FishKittenPolymorphicChildAssociationExtension, ExtensionModule, Aquatic::FishEnemyPolymorphicAssociationExtension0],
|
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 :dogs,
|
76
|
+
:source => :enemy,
|
77
|
+
:extend => [Aquatic::FishDogPolymorphicChildAssociationExtension, ExtensionModule, Aquatic::FishEnemyPolymorphicAssociationExtension0],
|
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 :eaters_foodstuffs,
|
88
|
+
:extend => [Petfood::PetfoodEaterPolymorphicJoinAssociationExtension0],
|
89
|
+
:dependent => :destroy,
|
90
|
+
:conditions => "NULL IS NULL OR NULL != 'Snausages'",
|
91
|
+
:as => :eater,
|
92
|
+
:class_name => "EatersFoodstuff",
|
93
|
+
:order => "NULL DESC"
|
94
|
+
# called from line 57
|
95
|
+
|
96
|
+
has_many :foodstuffs_of_eaters,
|
97
|
+
:source => :foodstuff,
|
98
|
+
:extend => [Petfood::PetfoodEaterPolymorphicParentAssociationExtension0],
|
99
|
+
:foreign_key => "foodstuff_id",
|
100
|
+
:limit => nil,
|
101
|
+
:through => :eaters_foodstuffs,
|
102
|
+
:group => nil,
|
103
|
+
:conditions => "petfoods.name IS NULL OR petfoods.name != 'Snausages'",
|
104
|
+
:offset => nil,
|
105
|
+
:class_name => "Petfood",
|
106
|
+
:order => "petfoods.the_petfood_primary_key DESC"
|
107
|
+
# called from line 57
|
108
|
+
|
109
|
+
end
|
@@ -0,0 +1,42 @@
|
|
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
|
@@ -0,0 +1,25 @@
|
|
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
|
@@ -0,0 +1,40 @@
|
|
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
|
@@ -0,0 +1,183 @@
|
|
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
|