view_mapper 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +3 -1
- data/VERSION +1 -1
- data/lib/view_mapper.rb +1 -0
- data/lib/view_mapper/belongs_to_parent_models.rb +12 -26
- data/lib/view_mapper/has_many_child_models.rb +9 -9
- data/lib/view_mapper/model_info.rb +56 -18
- data/lib/view_mapper/views/belongs_to/belongs_to_view.rb +14 -0
- data/lib/view_mapper/views/belongs_to_auto_complete/belongs_to_auto_complete_view.rb +9 -2
- data/lib/view_mapper/views/has_many/templates/helper.rb +1 -1
- data/lib/view_mapper/views/has_many/templates/view_child_form.html.erb +1 -1
- data/lib/view_mapper/views/has_many/templates/view_form.html.erb +1 -1
- data/lib/view_mapper/views/has_many_existing/has_many_existing_view.rb +126 -0
- data/lib/view_mapper/views/has_many_existing/templates/model.rb +21 -0
- data/lib/view_mapper/views/has_many_existing/templates/view_child_form.html.erb +16 -0
- data/lib/view_mapper/views/has_many_existing/templates/view_form.html.erb +20 -0
- data/lib/view_mapper/views/has_many_existing/templates/view_show.html.erb +26 -0
- data/test/generators/scaffold_for_view/scaffold_for_view_generator_test.rb +15 -15
- data/test/generators/view_for/view_for_generator_test.rb +18 -18
- data/test/model_info_test.rb +91 -20
- data/test/test_helper.rb +75 -105
- data/test/views/auto_complete/auto_complete_test.rb +104 -102
- data/test/views/auto_complete/expected_templates/edit.html.erb +6 -6
- data/test/views/auto_complete/expected_templates/expected_routes.rb +1 -1
- data/test/views/auto_complete/expected_templates/index.html.erb +10 -10
- data/test/views/auto_complete/expected_templates/new.html.erb +5 -5
- data/test/views/auto_complete/expected_templates/show.html.erb +6 -6
- data/test/views/auto_complete/expected_templates/{testies.html.erb → test_models.html.erb} +1 -1
- data/test/views/auto_complete/expected_templates/test_models_controller.rb +89 -0
- data/test/views/belongs_to/belongs_to_test.rb +238 -202
- data/test/views/belongs_to/expected_templates/_form.html.erb +4 -4
- data/test/views/belongs_to/expected_templates/child_model.rb +10 -0
- data/test/views/belongs_to/expected_templates/create_child_models.rb +18 -0
- data/test/views/belongs_to/expected_templates/edit.html.erb +4 -4
- data/test/views/belongs_to/expected_templates/index.html.erb +11 -11
- data/test/views/belongs_to/expected_templates/new.html.erb +3 -3
- data/test/views/belongs_to/expected_templates/show.html.erb +7 -7
- data/test/views/belongs_to_auto_complete/belongs_to_auto_complete_test.rb +440 -406
- data/test/views/belongs_to_auto_complete/expected_templates/_form.html.erb +4 -4
- data/test/views/belongs_to_auto_complete/expected_templates/child_model.rb +16 -0
- data/test/views/belongs_to_auto_complete/expected_templates/{some_other_models.html.erb → child_models.html.erb} +1 -1
- data/test/views/belongs_to_auto_complete/expected_templates/child_models_controller.rb +89 -0
- data/test/views/belongs_to_auto_complete/expected_templates/create_child_models.rb +18 -0
- data/test/views/belongs_to_auto_complete/expected_templates/edit.html.erb +4 -4
- data/test/views/belongs_to_auto_complete/expected_templates/expected_routes.rb +2 -2
- data/test/views/belongs_to_auto_complete/expected_templates/index.html.erb +11 -11
- data/test/views/belongs_to_auto_complete/expected_templates/new.html.erb +3 -3
- data/test/views/belongs_to_auto_complete/expected_templates/show.html.erb +7 -7
- data/test/views/has_many/expected_templates/_form.html.erb +8 -8
- data/test/views/has_many/expected_templates/{_person.html.erb → _second_child_model.html.erb} +5 -5
- data/test/views/has_many/expected_templates/create_parent_models.rb +16 -0
- data/test/views/has_many/expected_templates/edit.html.erb +4 -4
- data/test/views/has_many/expected_templates/index.html.erb +7 -7
- data/test/views/has_many/expected_templates/new.html.erb +3 -3
- data/test/views/has_many/expected_templates/{parent.rb → parent_model.rb} +5 -5
- data/test/views/has_many/expected_templates/show.html.erb +15 -15
- data/test/views/has_many/has_many_view_test.rb +334 -292
- data/test/views/has_many_existing/expected_templates/_assignment.html.erb +14 -0
- data/test/views/has_many_existing/expected_templates/_form.html.erb +16 -0
- data/test/views/{has_many/expected_templates/create_parents.rb → has_many_existing/expected_templates/create_programmers.rb} +3 -3
- data/test/views/has_many_existing/expected_templates/edit.html.erb +11 -0
- data/test/views/has_many_existing/expected_templates/index.html.erb +20 -0
- data/test/views/has_many_existing/expected_templates/new.html.erb +10 -0
- data/test/views/has_many_existing/expected_templates/programmer.rb +10 -0
- data/test/views/has_many_existing/expected_templates/show.html.erb +20 -0
- data/test/views/has_many_existing/has_many_existing_test.rb +495 -0
- data/test/views/paperclip/expected_templates/{create_testies.rb → create_test_models.rb} +3 -3
- data/test/views/paperclip/expected_templates/edit.html.erb +4 -4
- data/test/views/paperclip/expected_templates/index.html.erb +10 -10
- data/test/views/paperclip/expected_templates/new.html.erb +3 -3
- data/test/views/paperclip/expected_templates/show.html.erb +8 -8
- data/test/views/paperclip/expected_templates/{testy.rb → test_model.rb} +1 -1
- data/test/views/paperclip/paperclip_view_test.rb +254 -226
- data/view_mapper.gemspec +43 -27
- metadata +64 -37
- data/test/views/auto_complete/expected_templates/actual_index +0 -26
- data/test/views/auto_complete/expected_templates/testies_controller.rb +0 -89
- data/test/views/belongs_to/expected_templates/create_some_other_models.rb +0 -18
- data/test/views/belongs_to/expected_templates/some_other_model.rb +0 -10
- data/test/views/belongs_to_auto_complete/expected_templates/create_some_other_models.rb +0 -18
- data/test/views/belongs_to_auto_complete/expected_templates/some_other_model.rb +0 -16
- data/test/views/belongs_to_auto_complete/expected_templates/some_other_models_controller.rb +0 -89
data/view_mapper.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{view_mapper}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Pat Shaughnessy"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-04-04}
|
13
13
|
s.description = %q{View_mapper will generate scaffolding for new or existing models, customized for the plugins you use in your app.}
|
14
14
|
s.email = %q{pat@patshaughnessy.net}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -68,6 +68,11 @@ Gem::Specification.new do |s|
|
|
68
68
|
"lib/view_mapper/views/has_many/templates/view_form.html.erb",
|
69
69
|
"lib/view_mapper/views/has_many/templates/view_new.html.erb",
|
70
70
|
"lib/view_mapper/views/has_many/templates/view_show.html.erb",
|
71
|
+
"lib/view_mapper/views/has_many_existing/has_many_existing_view.rb",
|
72
|
+
"lib/view_mapper/views/has_many_existing/templates/model.rb",
|
73
|
+
"lib/view_mapper/views/has_many_existing/templates/view_child_form.html.erb",
|
74
|
+
"lib/view_mapper/views/has_many_existing/templates/view_form.html.erb",
|
75
|
+
"lib/view_mapper/views/has_many_existing/templates/view_show.html.erb",
|
71
76
|
"lib/view_mapper/views/paperclip/paperclip_view.rb",
|
72
77
|
"lib/view_mapper/views/paperclip/templates/migration.rb",
|
73
78
|
"lib/view_mapper/views/paperclip/templates/model.rb",
|
@@ -85,59 +90,67 @@ Gem::Specification.new do |s|
|
|
85
90
|
"test/test_helper.rb",
|
86
91
|
"test/view_mapper_test.rb",
|
87
92
|
"test/views/auto_complete/auto_complete_test.rb",
|
88
|
-
"test/views/auto_complete/expected_templates/actual_index",
|
89
93
|
"test/views/auto_complete/expected_templates/edit.html.erb",
|
90
94
|
"test/views/auto_complete/expected_templates/expected_routes.rb",
|
91
95
|
"test/views/auto_complete/expected_templates/index.html.erb",
|
92
96
|
"test/views/auto_complete/expected_templates/new.html.erb",
|
93
97
|
"test/views/auto_complete/expected_templates/show.html.erb",
|
94
98
|
"test/views/auto_complete/expected_templates/standard_routes.rb",
|
95
|
-
"test/views/auto_complete/expected_templates/
|
96
|
-
"test/views/auto_complete/expected_templates/
|
99
|
+
"test/views/auto_complete/expected_templates/test_models.html.erb",
|
100
|
+
"test/views/auto_complete/expected_templates/test_models_controller.rb",
|
97
101
|
"test/views/belongs_to/belongs_to_test.rb",
|
98
102
|
"test/views/belongs_to/expected_templates/_form.html.erb",
|
99
|
-
"test/views/belongs_to/expected_templates/
|
103
|
+
"test/views/belongs_to/expected_templates/child_model.rb",
|
104
|
+
"test/views/belongs_to/expected_templates/create_child_models.rb",
|
100
105
|
"test/views/belongs_to/expected_templates/edit.html.erb",
|
101
106
|
"test/views/belongs_to/expected_templates/index.html.erb",
|
102
107
|
"test/views/belongs_to/expected_templates/new.html.erb",
|
103
108
|
"test/views/belongs_to/expected_templates/show.html.erb",
|
104
|
-
"test/views/belongs_to/expected_templates/some_other_model.rb",
|
105
109
|
"test/views/belongs_to_auto_complete/belongs_to_auto_complete_test.rb",
|
106
110
|
"test/views/belongs_to_auto_complete/expected_templates/_form.html.erb",
|
107
|
-
"test/views/belongs_to_auto_complete/expected_templates/
|
111
|
+
"test/views/belongs_to_auto_complete/expected_templates/child_model.rb",
|
112
|
+
"test/views/belongs_to_auto_complete/expected_templates/child_models.html.erb",
|
113
|
+
"test/views/belongs_to_auto_complete/expected_templates/child_models_controller.rb",
|
114
|
+
"test/views/belongs_to_auto_complete/expected_templates/create_child_models.rb",
|
108
115
|
"test/views/belongs_to_auto_complete/expected_templates/edit.html.erb",
|
109
116
|
"test/views/belongs_to_auto_complete/expected_templates/expected_routes.rb",
|
110
117
|
"test/views/belongs_to_auto_complete/expected_templates/index.html.erb",
|
111
118
|
"test/views/belongs_to_auto_complete/expected_templates/new.html.erb",
|
112
119
|
"test/views/belongs_to_auto_complete/expected_templates/show.html.erb",
|
113
|
-
"test/views/belongs_to_auto_complete/expected_templates/some_other_model.rb",
|
114
|
-
"test/views/belongs_to_auto_complete/expected_templates/some_other_models.html.erb",
|
115
|
-
"test/views/belongs_to_auto_complete/expected_templates/some_other_models_controller.rb",
|
116
120
|
"test/views/belongs_to_auto_complete/expected_templates/standard_routes.rb",
|
117
121
|
"test/views/fake/fake_view.rb",
|
118
122
|
"test/views/fake/templates/fake_template1.html.erb",
|
119
123
|
"test/views/has_many/expected_templates/_form.html.erb",
|
120
|
-
"test/views/has_many/expected_templates/
|
121
|
-
"test/views/has_many/expected_templates/
|
124
|
+
"test/views/has_many/expected_templates/_second_child_model.html.erb",
|
125
|
+
"test/views/has_many/expected_templates/create_parent_models.rb",
|
122
126
|
"test/views/has_many/expected_templates/edit.html.erb",
|
123
127
|
"test/views/has_many/expected_templates/index.html.erb",
|
124
128
|
"test/views/has_many/expected_templates/new.html.erb",
|
125
|
-
"test/views/has_many/expected_templates/
|
129
|
+
"test/views/has_many/expected_templates/parent_model.rb",
|
126
130
|
"test/views/has_many/expected_templates/show.html.erb",
|
127
131
|
"test/views/has_many/has_many_view_test.rb",
|
128
|
-
"test/views/
|
132
|
+
"test/views/has_many_existing/expected_templates/_assignment.html.erb",
|
133
|
+
"test/views/has_many_existing/expected_templates/_form.html.erb",
|
134
|
+
"test/views/has_many_existing/expected_templates/create_programmers.rb",
|
135
|
+
"test/views/has_many_existing/expected_templates/edit.html.erb",
|
136
|
+
"test/views/has_many_existing/expected_templates/index.html.erb",
|
137
|
+
"test/views/has_many_existing/expected_templates/new.html.erb",
|
138
|
+
"test/views/has_many_existing/expected_templates/programmer.rb",
|
139
|
+
"test/views/has_many_existing/expected_templates/show.html.erb",
|
140
|
+
"test/views/has_many_existing/has_many_existing_test.rb",
|
141
|
+
"test/views/paperclip/expected_templates/create_test_models.rb",
|
129
142
|
"test/views/paperclip/expected_templates/edit.html.erb",
|
130
143
|
"test/views/paperclip/expected_templates/index.html.erb",
|
131
144
|
"test/views/paperclip/expected_templates/new.html.erb",
|
132
145
|
"test/views/paperclip/expected_templates/show.html.erb",
|
133
|
-
"test/views/paperclip/expected_templates/
|
146
|
+
"test/views/paperclip/expected_templates/test_model.rb",
|
134
147
|
"test/views/paperclip/paperclip_view_test.rb",
|
135
148
|
"view_mapper.gemspec"
|
136
149
|
]
|
137
150
|
s.homepage = %q{http://patshaughnessy.net/view_mapper}
|
138
151
|
s.rdoc_options = ["--charset=UTF-8"]
|
139
152
|
s.require_paths = ["lib"]
|
140
|
-
s.rubygems_version = %q{1.3.
|
153
|
+
s.rubygems_version = %q{1.3.6}
|
141
154
|
s.summary = %q{Scaffolding for your models and plugins}
|
142
155
|
s.test_files = [
|
143
156
|
"test/editable_manifest_test.rb",
|
@@ -151,22 +164,25 @@ Gem::Specification.new do |s|
|
|
151
164
|
"test/views/auto_complete/auto_complete_test.rb",
|
152
165
|
"test/views/auto_complete/expected_templates/expected_routes.rb",
|
153
166
|
"test/views/auto_complete/expected_templates/standard_routes.rb",
|
154
|
-
"test/views/auto_complete/expected_templates/
|
167
|
+
"test/views/auto_complete/expected_templates/test_models_controller.rb",
|
155
168
|
"test/views/belongs_to/belongs_to_test.rb",
|
156
|
-
"test/views/belongs_to/expected_templates/
|
157
|
-
"test/views/belongs_to/expected_templates/
|
169
|
+
"test/views/belongs_to/expected_templates/child_model.rb",
|
170
|
+
"test/views/belongs_to/expected_templates/create_child_models.rb",
|
158
171
|
"test/views/belongs_to_auto_complete/belongs_to_auto_complete_test.rb",
|
159
|
-
"test/views/belongs_to_auto_complete/expected_templates/
|
172
|
+
"test/views/belongs_to_auto_complete/expected_templates/child_model.rb",
|
173
|
+
"test/views/belongs_to_auto_complete/expected_templates/child_models_controller.rb",
|
174
|
+
"test/views/belongs_to_auto_complete/expected_templates/create_child_models.rb",
|
160
175
|
"test/views/belongs_to_auto_complete/expected_templates/expected_routes.rb",
|
161
|
-
"test/views/belongs_to_auto_complete/expected_templates/some_other_model.rb",
|
162
|
-
"test/views/belongs_to_auto_complete/expected_templates/some_other_models_controller.rb",
|
163
176
|
"test/views/belongs_to_auto_complete/expected_templates/standard_routes.rb",
|
164
177
|
"test/views/fake/fake_view.rb",
|
165
|
-
"test/views/has_many/expected_templates/
|
166
|
-
"test/views/has_many/expected_templates/
|
178
|
+
"test/views/has_many/expected_templates/create_parent_models.rb",
|
179
|
+
"test/views/has_many/expected_templates/parent_model.rb",
|
167
180
|
"test/views/has_many/has_many_view_test.rb",
|
168
|
-
"test/views/
|
169
|
-
"test/views/
|
181
|
+
"test/views/has_many_existing/expected_templates/create_programmers.rb",
|
182
|
+
"test/views/has_many_existing/expected_templates/programmer.rb",
|
183
|
+
"test/views/has_many_existing/has_many_existing_test.rb",
|
184
|
+
"test/views/paperclip/expected_templates/create_test_models.rb",
|
185
|
+
"test/views/paperclip/expected_templates/test_model.rb",
|
170
186
|
"test/views/paperclip/paperclip_view_test.rb"
|
171
187
|
]
|
172
188
|
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: view_mapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 3
|
8
|
+
- 4
|
9
|
+
version: 0.3.4
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Pat Shaughnessy
|
@@ -9,29 +14,33 @@ autorequire:
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date: 2010-
|
17
|
+
date: 2010-04-04 00:00:00 -04:00
|
13
18
|
default_executable:
|
14
19
|
dependencies:
|
15
20
|
- !ruby/object:Gem::Dependency
|
16
21
|
name: shoulda
|
17
|
-
|
18
|
-
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
24
|
requirements:
|
21
25
|
- - ">="
|
22
26
|
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 0
|
23
29
|
version: "0"
|
24
|
-
|
30
|
+
type: :development
|
31
|
+
version_requirements: *id001
|
25
32
|
- !ruby/object:Gem::Dependency
|
26
33
|
name: mocha
|
27
|
-
|
28
|
-
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
34
|
+
prerelease: false
|
35
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
37
|
- - ">="
|
32
38
|
- !ruby/object:Gem::Version
|
39
|
+
segments:
|
40
|
+
- 0
|
33
41
|
version: "0"
|
34
|
-
|
42
|
+
type: :development
|
43
|
+
version_requirements: *id002
|
35
44
|
description: View_mapper will generate scaffolding for new or existing models, customized for the plugins you use in your app.
|
36
45
|
email: pat@patshaughnessy.net
|
37
46
|
executables: []
|
@@ -93,6 +102,11 @@ files:
|
|
93
102
|
- lib/view_mapper/views/has_many/templates/view_form.html.erb
|
94
103
|
- lib/view_mapper/views/has_many/templates/view_new.html.erb
|
95
104
|
- lib/view_mapper/views/has_many/templates/view_show.html.erb
|
105
|
+
- lib/view_mapper/views/has_many_existing/has_many_existing_view.rb
|
106
|
+
- lib/view_mapper/views/has_many_existing/templates/model.rb
|
107
|
+
- lib/view_mapper/views/has_many_existing/templates/view_child_form.html.erb
|
108
|
+
- lib/view_mapper/views/has_many_existing/templates/view_form.html.erb
|
109
|
+
- lib/view_mapper/views/has_many_existing/templates/view_show.html.erb
|
96
110
|
- lib/view_mapper/views/paperclip/paperclip_view.rb
|
97
111
|
- lib/view_mapper/views/paperclip/templates/migration.rb
|
98
112
|
- lib/view_mapper/views/paperclip/templates/model.rb
|
@@ -110,52 +124,60 @@ files:
|
|
110
124
|
- test/test_helper.rb
|
111
125
|
- test/view_mapper_test.rb
|
112
126
|
- test/views/auto_complete/auto_complete_test.rb
|
113
|
-
- test/views/auto_complete/expected_templates/actual_index
|
114
127
|
- test/views/auto_complete/expected_templates/edit.html.erb
|
115
128
|
- test/views/auto_complete/expected_templates/expected_routes.rb
|
116
129
|
- test/views/auto_complete/expected_templates/index.html.erb
|
117
130
|
- test/views/auto_complete/expected_templates/new.html.erb
|
118
131
|
- test/views/auto_complete/expected_templates/show.html.erb
|
119
132
|
- test/views/auto_complete/expected_templates/standard_routes.rb
|
120
|
-
- test/views/auto_complete/expected_templates/
|
121
|
-
- test/views/auto_complete/expected_templates/
|
133
|
+
- test/views/auto_complete/expected_templates/test_models.html.erb
|
134
|
+
- test/views/auto_complete/expected_templates/test_models_controller.rb
|
122
135
|
- test/views/belongs_to/belongs_to_test.rb
|
123
136
|
- test/views/belongs_to/expected_templates/_form.html.erb
|
124
|
-
- test/views/belongs_to/expected_templates/
|
137
|
+
- test/views/belongs_to/expected_templates/child_model.rb
|
138
|
+
- test/views/belongs_to/expected_templates/create_child_models.rb
|
125
139
|
- test/views/belongs_to/expected_templates/edit.html.erb
|
126
140
|
- test/views/belongs_to/expected_templates/index.html.erb
|
127
141
|
- test/views/belongs_to/expected_templates/new.html.erb
|
128
142
|
- test/views/belongs_to/expected_templates/show.html.erb
|
129
|
-
- test/views/belongs_to/expected_templates/some_other_model.rb
|
130
143
|
- test/views/belongs_to_auto_complete/belongs_to_auto_complete_test.rb
|
131
144
|
- test/views/belongs_to_auto_complete/expected_templates/_form.html.erb
|
132
|
-
- test/views/belongs_to_auto_complete/expected_templates/
|
145
|
+
- test/views/belongs_to_auto_complete/expected_templates/child_model.rb
|
146
|
+
- test/views/belongs_to_auto_complete/expected_templates/child_models.html.erb
|
147
|
+
- test/views/belongs_to_auto_complete/expected_templates/child_models_controller.rb
|
148
|
+
- test/views/belongs_to_auto_complete/expected_templates/create_child_models.rb
|
133
149
|
- test/views/belongs_to_auto_complete/expected_templates/edit.html.erb
|
134
150
|
- test/views/belongs_to_auto_complete/expected_templates/expected_routes.rb
|
135
151
|
- test/views/belongs_to_auto_complete/expected_templates/index.html.erb
|
136
152
|
- test/views/belongs_to_auto_complete/expected_templates/new.html.erb
|
137
153
|
- test/views/belongs_to_auto_complete/expected_templates/show.html.erb
|
138
|
-
- test/views/belongs_to_auto_complete/expected_templates/some_other_model.rb
|
139
|
-
- test/views/belongs_to_auto_complete/expected_templates/some_other_models.html.erb
|
140
|
-
- test/views/belongs_to_auto_complete/expected_templates/some_other_models_controller.rb
|
141
154
|
- test/views/belongs_to_auto_complete/expected_templates/standard_routes.rb
|
142
155
|
- test/views/fake/fake_view.rb
|
143
156
|
- test/views/fake/templates/fake_template1.html.erb
|
144
157
|
- test/views/has_many/expected_templates/_form.html.erb
|
145
|
-
- test/views/has_many/expected_templates/
|
146
|
-
- test/views/has_many/expected_templates/
|
158
|
+
- test/views/has_many/expected_templates/_second_child_model.html.erb
|
159
|
+
- test/views/has_many/expected_templates/create_parent_models.rb
|
147
160
|
- test/views/has_many/expected_templates/edit.html.erb
|
148
161
|
- test/views/has_many/expected_templates/index.html.erb
|
149
162
|
- test/views/has_many/expected_templates/new.html.erb
|
150
|
-
- test/views/has_many/expected_templates/
|
163
|
+
- test/views/has_many/expected_templates/parent_model.rb
|
151
164
|
- test/views/has_many/expected_templates/show.html.erb
|
152
165
|
- test/views/has_many/has_many_view_test.rb
|
153
|
-
- test/views/
|
166
|
+
- test/views/has_many_existing/expected_templates/_assignment.html.erb
|
167
|
+
- test/views/has_many_existing/expected_templates/_form.html.erb
|
168
|
+
- test/views/has_many_existing/expected_templates/create_programmers.rb
|
169
|
+
- test/views/has_many_existing/expected_templates/edit.html.erb
|
170
|
+
- test/views/has_many_existing/expected_templates/index.html.erb
|
171
|
+
- test/views/has_many_existing/expected_templates/new.html.erb
|
172
|
+
- test/views/has_many_existing/expected_templates/programmer.rb
|
173
|
+
- test/views/has_many_existing/expected_templates/show.html.erb
|
174
|
+
- test/views/has_many_existing/has_many_existing_test.rb
|
175
|
+
- test/views/paperclip/expected_templates/create_test_models.rb
|
154
176
|
- test/views/paperclip/expected_templates/edit.html.erb
|
155
177
|
- test/views/paperclip/expected_templates/index.html.erb
|
156
178
|
- test/views/paperclip/expected_templates/new.html.erb
|
157
179
|
- test/views/paperclip/expected_templates/show.html.erb
|
158
|
-
- test/views/paperclip/expected_templates/
|
180
|
+
- test/views/paperclip/expected_templates/test_model.rb
|
159
181
|
- test/views/paperclip/paperclip_view_test.rb
|
160
182
|
- view_mapper.gemspec
|
161
183
|
has_rdoc: true
|
@@ -171,18 +193,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
171
193
|
requirements:
|
172
194
|
- - ">="
|
173
195
|
- !ruby/object:Gem::Version
|
196
|
+
segments:
|
197
|
+
- 0
|
174
198
|
version: "0"
|
175
|
-
version:
|
176
199
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
177
200
|
requirements:
|
178
201
|
- - ">="
|
179
202
|
- !ruby/object:Gem::Version
|
203
|
+
segments:
|
204
|
+
- 0
|
180
205
|
version: "0"
|
181
|
-
version:
|
182
206
|
requirements: []
|
183
207
|
|
184
208
|
rubyforge_project:
|
185
|
-
rubygems_version: 1.3.
|
209
|
+
rubygems_version: 1.3.6
|
186
210
|
signing_key:
|
187
211
|
specification_version: 3
|
188
212
|
summary: Scaffolding for your models and plugins
|
@@ -198,20 +222,23 @@ test_files:
|
|
198
222
|
- test/views/auto_complete/auto_complete_test.rb
|
199
223
|
- test/views/auto_complete/expected_templates/expected_routes.rb
|
200
224
|
- test/views/auto_complete/expected_templates/standard_routes.rb
|
201
|
-
- test/views/auto_complete/expected_templates/
|
225
|
+
- test/views/auto_complete/expected_templates/test_models_controller.rb
|
202
226
|
- test/views/belongs_to/belongs_to_test.rb
|
203
|
-
- test/views/belongs_to/expected_templates/
|
204
|
-
- test/views/belongs_to/expected_templates/
|
227
|
+
- test/views/belongs_to/expected_templates/child_model.rb
|
228
|
+
- test/views/belongs_to/expected_templates/create_child_models.rb
|
205
229
|
- test/views/belongs_to_auto_complete/belongs_to_auto_complete_test.rb
|
206
|
-
- test/views/belongs_to_auto_complete/expected_templates/
|
230
|
+
- test/views/belongs_to_auto_complete/expected_templates/child_model.rb
|
231
|
+
- test/views/belongs_to_auto_complete/expected_templates/child_models_controller.rb
|
232
|
+
- test/views/belongs_to_auto_complete/expected_templates/create_child_models.rb
|
207
233
|
- test/views/belongs_to_auto_complete/expected_templates/expected_routes.rb
|
208
|
-
- test/views/belongs_to_auto_complete/expected_templates/some_other_model.rb
|
209
|
-
- test/views/belongs_to_auto_complete/expected_templates/some_other_models_controller.rb
|
210
234
|
- test/views/belongs_to_auto_complete/expected_templates/standard_routes.rb
|
211
235
|
- test/views/fake/fake_view.rb
|
212
|
-
- test/views/has_many/expected_templates/
|
213
|
-
- test/views/has_many/expected_templates/
|
236
|
+
- test/views/has_many/expected_templates/create_parent_models.rb
|
237
|
+
- test/views/has_many/expected_templates/parent_model.rb
|
214
238
|
- test/views/has_many/has_many_view_test.rb
|
215
|
-
- test/views/
|
216
|
-
- test/views/
|
239
|
+
- test/views/has_many_existing/expected_templates/create_programmers.rb
|
240
|
+
- test/views/has_many_existing/expected_templates/programmer.rb
|
241
|
+
- test/views/has_many_existing/has_many_existing_test.rb
|
242
|
+
- test/views/paperclip/expected_templates/create_test_models.rb
|
243
|
+
- test/views/paperclip/expected_templates/test_model.rb
|
217
244
|
- test/views/paperclip/paperclip_view_test.rb
|
@@ -1,26 +0,0 @@
|
|
1
|
-
<h1>Listing testies</h1>
|
2
|
-
|
3
|
-
<table>
|
4
|
-
<tr>
|
5
|
-
<th>First name</th>
|
6
|
-
<th>Last name</th>
|
7
|
-
<th>Address</th>
|
8
|
-
<th>Some flag</th>
|
9
|
-
</tr>
|
10
|
-
|
11
|
-
<% @testies.each do |testy| %>
|
12
|
-
<tr>
|
13
|
-
<td><%=h testy.first_name %></td>
|
14
|
-
<td><%=h testy.last_name %></td>
|
15
|
-
<td><%=h testy.address %></td>
|
16
|
-
<td><%=h testy.some_flag %></td>
|
17
|
-
<td><%= link_to 'Show', testy %></td>
|
18
|
-
<td><%= link_to 'Edit', edit_testy_path(testy) %></td>
|
19
|
-
<td><%= link_to 'Destroy', testy, :confirm => 'Are you sure?', :method => :delete %></td>
|
20
|
-
</tr>
|
21
|
-
<% end %>
|
22
|
-
</table>
|
23
|
-
|
24
|
-
<br />
|
25
|
-
|
26
|
-
<%= link_to 'New testy', new_testy_path %>
|
@@ -1,89 +0,0 @@
|
|
1
|
-
class TestiesController < ApplicationController
|
2
|
-
|
3
|
-
auto_complete_for :testy, :first_name
|
4
|
-
auto_complete_for :testy, :last_name
|
5
|
-
|
6
|
-
# GET /testies
|
7
|
-
# GET /testies.xml
|
8
|
-
def index
|
9
|
-
@testies = Testy.all
|
10
|
-
|
11
|
-
respond_to do |format|
|
12
|
-
format.html # index.html.erb
|
13
|
-
format.xml { render :xml => @testies }
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
# GET /testies/1
|
18
|
-
# GET /testies/1.xml
|
19
|
-
def show
|
20
|
-
@testy = Testy.find(params[:id])
|
21
|
-
|
22
|
-
respond_to do |format|
|
23
|
-
format.html # show.html.erb
|
24
|
-
format.xml { render :xml => @testy }
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
# GET /testies/new
|
29
|
-
# GET /testies/new.xml
|
30
|
-
def new
|
31
|
-
@testy = Testy.new
|
32
|
-
|
33
|
-
respond_to do |format|
|
34
|
-
format.html # new.html.erb
|
35
|
-
format.xml { render :xml => @testy }
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
# GET /testies/1/edit
|
40
|
-
def edit
|
41
|
-
@testy = Testy.find(params[:id])
|
42
|
-
end
|
43
|
-
|
44
|
-
# POST /testies
|
45
|
-
# POST /testies.xml
|
46
|
-
def create
|
47
|
-
@testy = Testy.new(params[:testy])
|
48
|
-
|
49
|
-
respond_to do |format|
|
50
|
-
if @testy.save
|
51
|
-
flash[:notice] = 'Testy was successfully created.'
|
52
|
-
format.html { redirect_to(@testy) }
|
53
|
-
format.xml { render :xml => @testy, :status => :created, :location => @testy }
|
54
|
-
else
|
55
|
-
format.html { render :action => "new" }
|
56
|
-
format.xml { render :xml => @testy.errors, :status => :unprocessable_entity }
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
# PUT /testies/1
|
62
|
-
# PUT /testies/1.xml
|
63
|
-
def update
|
64
|
-
@testy = Testy.find(params[:id])
|
65
|
-
|
66
|
-
respond_to do |format|
|
67
|
-
if @testy.update_attributes(params[:testy])
|
68
|
-
flash[:notice] = 'Testy was successfully updated.'
|
69
|
-
format.html { redirect_to(@testy) }
|
70
|
-
format.xml { head :ok }
|
71
|
-
else
|
72
|
-
format.html { render :action => "edit" }
|
73
|
-
format.xml { render :xml => @testy.errors, :status => :unprocessable_entity }
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
|
-
# DELETE /testies/1
|
79
|
-
# DELETE /testies/1.xml
|
80
|
-
def destroy
|
81
|
-
@testy = Testy.find(params[:id])
|
82
|
-
@testy.destroy
|
83
|
-
|
84
|
-
respond_to do |format|
|
85
|
-
format.html { redirect_to(testies_url) }
|
86
|
-
format.xml { head :ok }
|
87
|
-
end
|
88
|
-
end
|
89
|
-
end
|