joinfix 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. data/README +1 -1
  2. data/lib/joinfix/fixtures.rb +130 -155
  3. data/lib/joinfix/fixtures_class.rb +95 -30
  4. data/lib/joinfix.rb +108 -45
  5. data/rails/log/development.log +71 -0
  6. data/rails/log/test.log +85 -0
  7. data/rails/test/test_helper.rb +1 -0
  8. data/test/belongs_to_polymorphic_test.rb +78 -0
  9. data/test/belongs_to_test.rb +135 -44
  10. data/test/belongs_to_with_options_test.rb +57 -0
  11. data/test/has_and_belongs_to_many_test.rb +36 -36
  12. data/test/has_and_belongs_to_many_with_options_test.rb +84 -0
  13. data/test/has_many_as_test.rb +66 -0
  14. data/test/has_many_test.rb +33 -69
  15. data/test/has_many_through_test.rb +79 -0
  16. data/test/has_many_through_with_options_test.rb +85 -0
  17. data/test/has_many_with_options_test.rb +63 -0
  18. data/test/has_one_test.rb +26 -27
  19. data/test/has_one_with_options_test.rb +57 -0
  20. data/test/joinfix_test.rb +5 -5
  21. data/test/joinfix_test_helper.rb +76 -16
  22. data/test/missing_fixture_test.rb +54 -0
  23. data/test/nested_test.rb +13 -6
  24. data/test/todo +15 -0
  25. metadata +48 -51
  26. data/test/fixtures/as_children.yml +0 -0
  27. data/test/fixtures/bt_children.yml +0 -0
  28. data/test/fixtures/bt_parents.yml +0 -30
  29. data/test/fixtures/habtm_children.yml +0 -0
  30. data/test/fixtures/habtm_children_habtm_parents.yml +0 -0
  31. data/test/fixtures/habtm_joins.yml +0 -0
  32. data/test/fixtures/habtm_parents.yml +0 -18
  33. data/test/fixtures/hm_children.yml +0 -0
  34. data/test/fixtures/hm_joins.yml +0 -0
  35. data/test/fixtures/hm_parents.yml +0 -34
  36. data/test/fixtures/ho_children.yml +0 -0
  37. data/test/fixtures/ho_parents.yml +0 -14
  38. data/test/fixtures/no_join_fixes.yml +0 -4
  39. data/test/fixtures/omap_no_join_fixes.yml +0 -7
  40. data/test/fixtures/polymorphic_children.yml +0 -0
data/test/has_one_test.rb CHANGED
@@ -1,6 +1,10 @@
1
1
  require File.dirname(__FILE__) + '/joinfix_test_helper'
2
2
 
3
- class HoMigration < ActiveRecord::Migration
3
+ #
4
+ # has_one tests
5
+ #
6
+
7
+ class HasOneMigration < ActiveRecord::Migration
4
8
  def self.up
5
9
  create_table :ho_parents do |t|
6
10
  t.column :field, :string
@@ -8,7 +12,6 @@ class HoMigration < ActiveRecord::Migration
8
12
  create_table :ho_children do |t|
9
13
  t.column :field, :string
10
14
  t.column :ho_parent_id, :integer
11
- t.column :alt_id, :integer
12
15
  end
13
16
  end
14
17
 
@@ -20,9 +23,6 @@ end
20
23
 
21
24
  class HoParent < ActiveRecord::Base
22
25
  has_one :ho_child
23
- has_one :child,
24
- :foreign_key => "alt_id",
25
- :class_name => "HoChild"
26
26
  end
27
27
 
28
28
  class HoChild < ActiveRecord::Base
@@ -30,27 +30,26 @@ end
30
30
 
31
31
  class HasOneTest < Test::Unit::TestCase
32
32
  fixtures :ho_parents, :ho_children
33
-
34
- def setup
35
- end
36
-
37
- def teardown
38
- end
39
-
40
- def test_has_one
41
- database_test(HoMigration) do
42
- entry = ho_parents(:without_child)
43
- assert_equal "without_child", entry.field
44
- assert_nil entry.ho_child
45
- assert_nil entry.child
46
-
47
- entry = ho_parents(:with_ho_child)
48
- assert_equal "with_ho_child", entry.field
49
- assert_equal "1", entry.ho_child.field
50
-
51
- entry = ho_parents(:with_child)
52
- assert_equal "with_child", entry.field
53
- assert_equal "2", entry.child.field
54
- end
33
+
34
+ def test_has_one_with_options
35
+ setup_fixtures(
36
+ :ho_parents => %Q{
37
+ parent_entry:
38
+ field: parent value
39
+ ho_child:
40
+ child_entry:
41
+ field: child value},
42
+ :ho_children => "")
43
+
44
+ assert_fixtures(
45
+ :ho_parents => %Q{
46
+ parent_entry:
47
+ id: 1
48
+ field: parent value},
49
+ :ho_children => %Q{
50
+ child_entry:
51
+ id: 1
52
+ ho_parent_id: 1
53
+ field: child value})
55
54
  end
56
55
  end
@@ -0,0 +1,57 @@
1
+ require File.dirname(__FILE__) + '/joinfix_test_helper'
2
+
3
+ #
4
+ # has_one with options
5
+ #
6
+
7
+ class HasOneWithOptionsMigration < ActiveRecord::Migration
8
+ def self.up
9
+ create_table :ho_with_options_parents do |t|
10
+ t.column :field, :string
11
+ end
12
+ create_table :ho_with_options_children do |t|
13
+ t.column :field, :string
14
+ t.column :alternate, :integer
15
+ end
16
+ end
17
+
18
+ def self.down
19
+ drop_table :ho_with_options_parents
20
+ drop_table :ho_with_options_children
21
+ end
22
+ end
23
+
24
+ class HoWithOptionsParent < ActiveRecord::Base
25
+ has_one :child,
26
+ :foreign_key => "alternate",
27
+ :class_name => "HoWithOptionsChild"
28
+ end
29
+
30
+ class HoWithOptionsChild < ActiveRecord::Base
31
+ end
32
+
33
+ class HasOneWithOptionsTest < Test::Unit::TestCase
34
+ fixtures :ho_with_options_parents, :ho_with_options_children
35
+
36
+ def test_has_one_with_options
37
+ setup_fixtures(
38
+ :ho_with_options_parents => %Q{
39
+ parent_entry:
40
+ field: parent value
41
+ child:
42
+ child_entry:
43
+ field: child value},
44
+ :ho_with_options_children => "")
45
+
46
+ assert_fixtures(
47
+ :ho_with_options_parents => %Q{
48
+ parent_entry:
49
+ id: 1
50
+ field: parent value},
51
+ :ho_with_options_children => %Q{
52
+ child_entry:
53
+ id: 1
54
+ alternate: 1
55
+ field: child value})
56
+ end
57
+ end
data/test/joinfix_test.rb CHANGED
@@ -40,14 +40,14 @@ class JoinFixTest < Test::Unit::TestCase
40
40
  # compatability tests
41
41
  #
42
42
 
43
- def test_fixtures_without_templates_are_unaffected
43
+ def btest_fixtures_without_templates_are_unaffected
44
44
  database_test(NoJoinFixMigration) do |connection|
45
45
  assert_equal "1", no_join_fixes(:first).field
46
46
  assert_equal "2", no_join_fixes(:second).field
47
47
  end
48
48
  end
49
49
 
50
- def test_omap_fixtures_without_templates_are_unaffected
50
+ def btest_omap_fixtures_without_templates_are_unaffected
51
51
  database_test(NoJoinFixMigration) do |connection|
52
52
  assert_equal 1, omap_no_join_fixes(:first).id
53
53
  assert_equal 2, omap_no_join_fixes(:second).id
@@ -58,7 +58,7 @@ class JoinFixTest < Test::Unit::TestCase
58
58
  # preserved keys test
59
59
  #
60
60
 
61
- def test_id_keys_are_preserved
61
+ def btest_id_keys_are_preserved
62
62
  [:id, :preserved_id].each do |key|
63
63
  assert JoinFix.preserves?(key)
64
64
  assert JoinFix.preserves?(key.to_s)
@@ -143,7 +143,7 @@ class JoinFixTest < Test::Unit::TestCase
143
143
  assert_equal({["foreign_key", "parent_table"] => "parent_entry", ["association_foreign_key", "child_table"] => "child_entry"}, join)
144
144
  end
145
145
 
146
- def test_join_has_and_belongs_to_many_with_attributes
146
+ def btest_join_has_and_belongs_to_many_with_attributes
147
147
  attributes = {:some_attribute => "attribute"}
148
148
 
149
149
  join = parent.join_has_and_belongs_to_many(child,
@@ -201,7 +201,7 @@ class JoinFixTest < Test::Unit::TestCase
201
201
  assert_equal({["foreign_key", "parent_table"] => "parent_entry", ["association_foreign_key", "child_table"] => "child_entry"}, join)
202
202
  end
203
203
 
204
- def test_join_has_many_through_with_attributes
204
+ def btest_join_has_many_through_with_attributes
205
205
  attributes = {:some_attribute => "attribute"}
206
206
 
207
207
  join = parent.join_has_many(child,
@@ -22,33 +22,93 @@ rescue
22
22
  end
23
23
 
24
24
  class Test::Unit::TestCase
25
- # With the setup in fixtures, I had to override setup and teardown so
26
- # that by default, the setup_with_fixtures method is not called
27
- #
28
- # I do want to call setup_with_fixtures, but only in the context
29
- # of database test
25
+ # Because all of the fixture files are being created dynamically in the
26
+ # tests, I had to override setup so that by default, the setup_with_fixtures
27
+ # method is not called -- furthermore it has to be done twice, once to prevent
28
+ # the call to setup_with_fixtures, then again to setup the migration as below
29
+ def setup
30
+ end
30
31
 
32
+ def teardown
33
+ end
34
+ end
35
+
36
+ class Test::Unit::TestCase
31
37
  def setup
38
+ migration.up if connected?
32
39
  end
33
40
 
34
41
  def teardown
42
+ if connected?
43
+ teardown_with_fixtures
44
+ migration.down
45
+ fixture_table_names.each do |table_name|
46
+ filepath = fixture_filepath(table_name)
47
+ File.delete(filepath) if File.exists?(filepath)
48
+ end
49
+ end
50
+ end
51
+
52
+ def connected?
53
+ ActiveRecord::Base.connected?
35
54
  end
36
55
 
37
- def database_test(*migrations, &block)
38
- switch_test( ActiveRecord::Base.connected? ) do
39
- ActiveRecord::Migration.verbose = false
56
+ def migration
57
+ Object.const_get(self.class.to_s.chomp("Test") + "Migration")
58
+ end
59
+
60
+ def fixture_filepath(table_name)
61
+ File.join(fixture_path, table_name.to_s + ".yml")
62
+ end
63
+
64
+ def setup_fixtures(hash)
65
+ database_test do
66
+ hash.each_pair do |table_name, content|
67
+ filepath = fixture_filepath(table_name)
68
+ File.open(filepath, 'w') {|file| file << content}
69
+ end
40
70
 
41
- begin
42
- migrations.each {|migration| migration.up}
43
- setup_with_fixtures
44
- yield(ActiveRecord::Base.connection)
45
- ensure
46
- teardown_with_fixtures
47
- migrations.each {|migration| migration.down}
71
+ # important to reset these to keep tests separate
72
+ Fixtures.all_loaded_fixtures = {}
73
+ @@already_loaded_fixtures = {}
74
+ setup_with_fixtures
75
+ end
76
+ end
77
+
78
+ def assert_fixtures(hash)
79
+ database_test do
80
+ hash.each_pair do |table_name, content|
81
+ fixtures = Fixtures.all_loaded_fixtures[table_name.to_s]
82
+ content_hash = YAML.load(content) || {}
83
+
84
+ assert fixtures, "no join fixture exists for: #{table_name}"
85
+ assert_equal content_hash , fixtures.to_hash
86
+ end
87
+ end
88
+ end
89
+
90
+ def database_test(&block)
91
+ switch_test(connected?) do
92
+ yield
93
+ end
94
+ end
95
+
96
+ def error_test(type, &block)
97
+ switch_test(connected?) do
98
+ if env('show_errors')
99
+ begin
100
+ yield
101
+ flunk "No #{type} was raised"
102
+ rescue
103
+ puts $!.message
104
+ end
105
+ else
106
+ assert_raise(type) { yield }
48
107
  end
49
108
  end
50
109
  end
51
110
  end
52
111
 
53
112
  # set the fixture path
54
- Test::Unit::TestCase.fixture_path = File.dirname(__FILE__) + "/fixtures"
113
+ Test::Unit::TestCase.fixture_path = File.dirname(__FILE__) + "/fixtures"
114
+ ActiveRecord::Migration.verbose = false
@@ -0,0 +1,54 @@
1
+ require File.dirname(__FILE__) + '/joinfix_test_helper'
2
+
3
+ class MissingFixtureMigration < ActiveRecord::Migration
4
+ def self.up
5
+ create_table :missing_fixture_parents do |t|
6
+ t.column :field, :string
7
+ t.column :missing_fixture_child_id, :integer
8
+ end
9
+ create_table :missing_fixture_children do |t|
10
+ t.column :field, :string
11
+ end
12
+ end
13
+
14
+ def self.down
15
+ drop_table :missing_fixture_parents
16
+ drop_table :missing_fixture_children
17
+ end
18
+ end
19
+
20
+ class MissingFixtureParent < ActiveRecord::Base
21
+ belongs_to :missing_fixture_child
22
+ end
23
+
24
+ class MissingFixtureChild < ActiveRecord::Base
25
+ end
26
+
27
+ class MissingFixtureTest < Test::Unit::TestCase
28
+ fixtures :missing_fixture_parents
29
+
30
+ def test_error_if_not_all_fixtures_recieving_entries_are_specified
31
+ error_test(MissingFixtureError) do
32
+ setup_fixtures(
33
+ :missing_fixture_parents => %Q{
34
+ parent_entry:
35
+ field: parent_entry
36
+ missing_fixture_child:
37
+ child_entry:
38
+ field: child value})
39
+ end
40
+ end
41
+
42
+ def test_no_error_if_missing_fixture_is_not_required
43
+ setup_fixtures(
44
+ :missing_fixture_parents => %Q{
45
+ parent_entry:
46
+ field: parent value})
47
+
48
+ assert_fixtures(
49
+ :missing_fixture_parents => %Q{
50
+ parent_entry:
51
+ id: 1
52
+ field: parent value})
53
+ end
54
+ end
data/test/nested_test.rb CHANGED
@@ -40,29 +40,36 @@ end
40
40
 
41
41
  class NestedTest < Test::Unit::TestCase
42
42
  fixtures :nested_parents, :nested_children, :inner_children
43
-
43
+
44
44
  def setup
45
+ if connected?
46
+ migration.up
47
+ # setup fixtures from the start
48
+ setup_with_fixtures
49
+ end
45
50
  end
46
51
 
47
52
  def teardown
53
+ migration.down if connected?
54
+ # do not delete files!
48
55
  end
49
56
 
50
57
  def test_nested_fixtures
51
- database_test(NestedMigration) do
58
+ database_test do
52
59
  parent_one= nested_parents(:parent_one)
53
60
  parent_two = nested_parents(:parent_two)
54
61
  parent_three = nested_parents(:parent_three)
55
62
  parent_four = nested_parents(:parent_four)
56
-
63
+
57
64
  query_result = NestedChild.find_by_field(1).nested_parent
58
65
  assert_equal parent_one, query_result
59
-
66
+
60
67
  query_result = NestedParent.find_by_field(1).nested_children.first.inner_children.first.nested_parents
61
68
  assert_equal [parent_two, parent_three], query_result
62
-
69
+
63
70
  query_result = NestedParent.find_by_field(1).inner_child.nested_child.nested_parent
64
71
  assert_equal parent_two, query_result
65
-
72
+
66
73
  query_result = InnerChild.find_by_field(3).nested_parents.first
67
74
  assert_equal parent_four, query_result
68
75
  end
data/test/todo ADDED
@@ -0,0 +1,15 @@
1
+ test error conditions:
2
+ -- fixture not specified
3
+ -- model not specified
4
+ -- name collisions
5
+ -- id collisions
6
+
7
+ test also:
8
+ -- omaps
9
+ -- fixtures across different test
10
+ -- mapping a fixture to a class
11
+ -- default field values
12
+
13
+ devel:
14
+ -- clean up error handling -- make appropriate subclasses of error
15
+ -- annoying that the re-raise loses the original stack trace
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: joinfix
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.0
7
- date: 2007-05-11 00:00:00 -06:00
6
+ version: 0.1.1
7
+ date: 2007-05-13 00:00:00 -06:00
8
8
  summary: A reflection-based solution to the fixture join problem.
9
9
  require_paths:
10
10
  - lib
@@ -29,84 +29,75 @@ post_install_message:
29
29
  authors:
30
30
  - Simon Chiang
31
31
  files:
32
+ - test/belongs_to_polymorphic_test.rb
32
33
  - test/belongs_to_test.rb
34
+ - test/belongs_to_with_options_test.rb
33
35
  - test/config.yml
34
36
  - test/fixtures
37
+ - test/fixtures/inner_children.yml
38
+ - test/fixtures/nested_children.yml
39
+ - test/fixtures/nested_parents.yml
35
40
  - test/has_and_belongs_to_many_test.rb
41
+ - test/has_and_belongs_to_many_with_options_test.rb
42
+ - test/has_many_as_test.rb
36
43
  - test/has_many_test.rb
44
+ - test/has_many_through_test.rb
45
+ - test/has_many_through_with_options_test.rb
46
+ - test/has_many_with_options_test.rb
37
47
  - test/has_one_test.rb
48
+ - test/has_one_with_options_test.rb
38
49
  - test/joinfix_test.rb
39
50
  - test/joinfix_test_helper.rb
40
51
  - test/joinfix_test_suite.rb
52
+ - test/missing_fixture_test.rb
41
53
  - test/nested_test.rb
42
- - test/fixtures/as_children.yml
43
- - test/fixtures/bt_children.yml
44
- - test/fixtures/bt_parents.yml
45
- - test/fixtures/habtm_children.yml
46
- - test/fixtures/habtm_children_habtm_parents.yml
47
- - test/fixtures/habtm_joins.yml
48
- - test/fixtures/habtm_parents.yml
49
- - test/fixtures/hm_children.yml
50
- - test/fixtures/hm_joins.yml
51
- - test/fixtures/hm_parents.yml
52
- - test/fixtures/ho_children.yml
53
- - test/fixtures/ho_parents.yml
54
- - test/fixtures/inner_children.yml
55
- - test/fixtures/nested_children.yml
56
- - test/fixtures/nested_parents.yml
57
- - test/fixtures/no_join_fixes.yml
58
- - test/fixtures/omap_no_join_fixes.yml
59
- - test/fixtures/polymorphic_children.yml
54
+ - test/todo
60
55
  - lib/joinfix
61
- - lib/joinfix.rb
62
56
  - lib/joinfix/fixture.rb
63
57
  - lib/joinfix/fixtures.rb
64
58
  - lib/joinfix/fixtures_class.rb
59
+ - lib/joinfix.rb
65
60
  - rails/app
66
- - rails/components
67
- - rails/config
68
- - rails/db
69
- - rails/doc
70
- - rails/lib
71
- - rails/log
72
- - rails/public
73
- - rails/Rakefile
74
- - rails/README
75
- - rails/script
76
- - rails/test
77
- - rails/tmp
78
- - rails/vendor
79
61
  - rails/app/controllers
80
- - rails/app/helpers
81
- - rails/app/models
82
- - rails/app/views
83
62
  - rails/app/controllers/application.rb
63
+ - rails/app/helpers
84
64
  - rails/app/helpers/application_helper.rb
65
+ - rails/app/models
85
66
  - rails/app/models/group.rb
86
67
  - rails/app/models/inner_child.rb
87
68
  - rails/app/models/nested_child.rb
88
69
  - rails/app/models/nested_parent.rb
89
70
  - rails/app/models/user.rb
90
71
  - rails/app/models/user_group.rb
72
+ - rails/app/views
91
73
  - rails/app/views/layouts
74
+ - rails/components
75
+ - rails/config
92
76
  - rails/config/boot.rb
93
77
  - rails/config/database.yml
94
78
  - rails/config/environment.rb
95
79
  - rails/config/environments
96
- - rails/config/routes.rb
97
80
  - rails/config/environments/development.rb
98
81
  - rails/config/environments/production.rb
99
82
  - rails/config/environments/test.rb
83
+ - rails/config/routes.rb
84
+ - rails/db
100
85
  - rails/db/migrate
101
- - rails/db/schema.rb
102
86
  - rails/db/migrate/001_create_nested_parents.rb
103
87
  - rails/db/migrate/002_create_nested_children.rb
104
88
  - rails/db/migrate/003_create_inner_children.rb
105
89
  - rails/db/migrate/004_create_users.rb
106
90
  - rails/db/migrate/005_create_groups.rb
107
91
  - rails/db/migrate/006_create_user_groups.rb
92
+ - rails/db/schema.rb
93
+ - rails/doc
108
94
  - rails/doc/README_FOR_APP
95
+ - rails/lib
109
96
  - rails/lib/tasks
97
+ - rails/log
98
+ - rails/log/development.log
99
+ - rails/log/test.log
100
+ - rails/public
110
101
  - rails/public/404.html
111
102
  - rails/public/500.html
112
103
  - rails/public/dispatch.cgi
@@ -114,51 +105,57 @@ files:
114
105
  - rails/public/dispatch.rb
115
106
  - rails/public/favicon.ico
116
107
  - rails/public/images
108
+ - rails/public/images/rails.png
117
109
  - rails/public/index.html
118
110
  - rails/public/javascripts
119
- - rails/public/robots.txt
120
- - rails/public/stylesheets
121
- - rails/public/images/rails.png
122
111
  - rails/public/javascripts/application.js
123
112
  - rails/public/javascripts/controls.js
124
113
  - rails/public/javascripts/dragdrop.js
125
114
  - rails/public/javascripts/effects.js
126
115
  - rails/public/javascripts/prototype.js
116
+ - rails/public/robots.txt
117
+ - rails/public/stylesheets
118
+ - rails/Rakefile
119
+ - rails/README
120
+ - rails/script
127
121
  - rails/script/about
128
122
  - rails/script/breakpointer
129
123
  - rails/script/console
130
124
  - rails/script/destroy
131
125
  - rails/script/generate
132
126
  - rails/script/performance
133
- - rails/script/plugin
134
- - rails/script/process
135
- - rails/script/runner
136
- - rails/script/server
137
127
  - rails/script/performance/benchmarker
138
128
  - rails/script/performance/profiler
129
+ - rails/script/plugin
130
+ - rails/script/process
139
131
  - rails/script/process/inspector
140
132
  - rails/script/process/reaper
141
133
  - rails/script/process/spawner
134
+ - rails/script/runner
135
+ - rails/script/server
136
+ - rails/test
142
137
  - rails/test/fixtures
143
- - rails/test/functional
144
- - rails/test/integration
145
- - rails/test/mocks
146
- - rails/test/test_helper.rb
147
- - rails/test/unit
148
138
  - rails/test/fixtures/groups.yml
149
139
  - rails/test/fixtures/inner_children.yml
150
140
  - rails/test/fixtures/nested_children.yml
151
141
  - rails/test/fixtures/nested_parents.yml
152
142
  - rails/test/fixtures/users.yml
153
143
  - rails/test/fixtures/user_groups.yml
144
+ - rails/test/functional
145
+ - rails/test/integration
146
+ - rails/test/mocks
154
147
  - rails/test/mocks/development
155
148
  - rails/test/mocks/test
149
+ - rails/test/test_helper.rb
150
+ - rails/test/unit
156
151
  - rails/test/unit/group_test.rb
157
152
  - rails/test/unit/inner_child_test.rb
158
153
  - rails/test/unit/nested_child_test.rb
159
154
  - rails/test/unit/nested_parent_test.rb
160
155
  - rails/test/unit/user_group_test.rb
161
156
  - rails/test/unit/user_test.rb
157
+ - rails/tmp
158
+ - rails/vendor
162
159
  - rails/vendor/plugins
163
160
  - README
164
161
  - MIT-LICENSE
File without changes
File without changes
@@ -1,30 +0,0 @@
1
- without_child:
2
- field: without_child
3
-
4
- with_bt_child:
5
- field: with_bt_child
6
- bt_child:
7
- first:
8
- field: 1
9
-
10
- with_child:
11
- field: with_child
12
- child:
13
- second:
14
- field: 2
15
-
16
- with_both:
17
- field: with_both
18
- bt_child:
19
- third:
20
- field: 3
21
- child:
22
- fourth:
23
- field: 4
24
-
25
- with_polymorph:
26
- field: with_polymorphic_child
27
- polymorph_type: PolymorphicChild
28
- polymorph:
29
- fifth:
30
- field: 7
File without changes
File without changes
File without changes
@@ -1,18 +0,0 @@
1
- without_children:
2
- field: without_children
3
-
4
- with_habtm_children:
5
- field: with_habtm_children
6
- habtm_children:
7
- first:
8
- field: 1
9
- second:
10
- field: 2
11
-
12
- with_children:
13
- field: with_children
14
- children:
15
- third:
16
- field: 3
17
- fourth:
18
- field: 4
File without changes
File without changes