starter-template_generator 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. data/LICENSE +20 -0
  2. data/Manifest +32 -0
  3. data/README.markdown +76 -0
  4. data/Rakefile +26 -0
  5. data/TODO +8 -0
  6. data/VERSION.yml +4 -0
  7. data/rails_generators/shoulda_model/USAGE +27 -0
  8. data/rails_generators/shoulda_model/shoulda_model_generator.rb +49 -0
  9. data/rails_generators/shoulda_model/templates/factory.rb +5 -0
  10. data/rails_generators/shoulda_model/templates/fixtures.yml +19 -0
  11. data/rails_generators/shoulda_model/templates/migration.rb +16 -0
  12. data/rails_generators/shoulda_model/templates/model.rb +2 -0
  13. data/rails_generators/shoulda_model/templates/unit_test.rb +7 -0
  14. data/rails_generators/shoulda_scaffold/USAGE +34 -0
  15. data/rails_generators/shoulda_scaffold/shoulda_scaffold_generator.rb +160 -0
  16. data/rails_generators/shoulda_scaffold/templates/blueprint/ie.css +35 -0
  17. data/rails_generators/shoulda_scaffold/templates/blueprint/print.css +30 -0
  18. data/rails_generators/shoulda_scaffold/templates/blueprint/screen.css +256 -0
  19. data/rails_generators/shoulda_scaffold/templates/controller.rb +65 -0
  20. data/rails_generators/shoulda_scaffold/templates/erb/_form.html.erb +8 -0
  21. data/rails_generators/shoulda_scaffold/templates/erb/edit.html.erb +12 -0
  22. data/rails_generators/shoulda_scaffold/templates/erb/index.html.erb +24 -0
  23. data/rails_generators/shoulda_scaffold/templates/erb/layout.html.erb +22 -0
  24. data/rails_generators/shoulda_scaffold/templates/erb/new.html.erb +8 -0
  25. data/rails_generators/shoulda_scaffold/templates/erb/show.html.erb +14 -0
  26. data/rails_generators/shoulda_scaffold/templates/functional_test/basic.rb +66 -0
  27. data/rails_generators/shoulda_scaffold/templates/haml/_form.html.haml +7 -0
  28. data/rails_generators/shoulda_scaffold/templates/haml/edit.html.haml +11 -0
  29. data/rails_generators/shoulda_scaffold/templates/haml/index.html.haml +23 -0
  30. data/rails_generators/shoulda_scaffold/templates/haml/new.html.haml +9 -0
  31. data/rails_generators/shoulda_scaffold/templates/haml/show.html.haml +11 -0
  32. data/rails_generators/shoulda_scaffold/templates/helper.rb +2 -0
  33. data/test/fixtures/about_yml_plugins/bad_about_yml/about.yml +1 -0
  34. data/test/fixtures/about_yml_plugins/bad_about_yml/init.rb +1 -0
  35. data/test/fixtures/about_yml_plugins/plugin_without_about_yml/init.rb +1 -0
  36. data/test/fixtures/eager/zoo.rb +3 -0
  37. data/test/fixtures/eager/zoo/reptile_house.rb +2 -0
  38. data/test/fixtures/environment_with_constant.rb +1 -0
  39. data/test/fixtures/lib/generators/missing_class/missing_class_generator.rb +0 -0
  40. data/test/fixtures/lib/generators/working/working_generator.rb +2 -0
  41. data/test/fixtures/plugins/alternate/a/generators/a_generator/a_generator.rb +4 -0
  42. data/test/fixtures/plugins/default/gemlike/init.rb +1 -0
  43. data/test/fixtures/plugins/default/gemlike/lib/gemlike.rb +2 -0
  44. data/test/fixtures/plugins/default/gemlike/rails/init.rb +7 -0
  45. data/test/fixtures/plugins/default/plugin_with_no_lib_dir/init.rb +0 -0
  46. data/test/fixtures/plugins/default/stubby/about.yml +2 -0
  47. data/test/fixtures/plugins/default/stubby/generators/stubby_generator/stubby_generator.rb +4 -0
  48. data/test/fixtures/plugins/default/stubby/init.rb +7 -0
  49. data/test/fixtures/plugins/default/stubby/lib/stubby_mixin.rb +2 -0
  50. data/test/rails_generators/shoulda_model_generator_test.rb +39 -0
  51. data/test/shoulda_macros/generator_macros.rb +36 -0
  52. data/test/stolen_from_railties.rb +288 -0
  53. data/test/test_helper.rb +41 -0
  54. metadata +116 -0
@@ -0,0 +1,35 @@
1
+ /* -----------------------------------------------------------------------
2
+
3
+
4
+ Blueprint CSS Framework 0.9
5
+ http://blueprintcss.org
6
+
7
+ * Copyright (c) 2007-Present. See LICENSE for more info.
8
+ * See README for instructions on how to use Blueprint.
9
+ * For credits and origins, see AUTHORS.
10
+ * This is a compressed file. See the sources in the 'src' directory.
11
+
12
+ ----------------------------------------------------------------------- */
13
+
14
+ /* ie.css */
15
+ body {text-align:center;}
16
+ .container {text-align:left;}
17
+ * html .column, * html div.span-1, * html div.span-2, * html div.span-3, * html div.span-4, * html div.span-5, * html div.span-6, * html div.span-7, * html div.span-8, * html div.span-9, * html div.span-10, * html div.span-11, * html div.span-12, * html div.span-13, * html div.span-14, * html div.span-15, * html div.span-16, * html div.span-17, * html div.span-18, * html div.span-19, * html div.span-20, * html div.span-21, * html div.span-22, * html div.span-23, * html div.span-24 {overflow-x:hidden;}
18
+ * html legend {margin:0px -8px 16px 0;padding:0;}
19
+ ol {margin-left:2em;}
20
+ sup {vertical-align:text-top;}
21
+ sub {vertical-align:text-bottom;}
22
+ html>body p code {*white-space:normal;}
23
+ hr {margin:-8px auto 11px;}
24
+ img {-ms-interpolation-mode:bicubic;}
25
+ .clearfix, .container {display:inline-block;}
26
+ * html .clearfix, * html .container {height:1%;}
27
+ fieldset {padding-top:0;}
28
+ input.text, input.title {background-color:#fff;border:1px solid #bbb;}
29
+ input.text:focus, input.title:focus {border-color:#666;}
30
+ input.text, input.title, textarea, select {margin:0.5em 0;}
31
+ input.checkbox, input.radio {position:relative;top:.25em;}
32
+ form.inline div, form.inline p {vertical-align:middle;}
33
+ form.inline label {position:relative;top:-0.25em;}
34
+ form.inline input.checkbox, form.inline input.radio, form.inline input.button, form.inline button {margin:0.5em 0;}
35
+ button, input.button {position:relative;top:0.25em;}
@@ -0,0 +1,30 @@
1
+ /* -----------------------------------------------------------------------
2
+
3
+
4
+ Blueprint CSS Framework 0.9
5
+ http://blueprintcss.org
6
+
7
+ * Copyright (c) 2007-Present. See LICENSE for more info.
8
+ * See README for instructions on how to use Blueprint.
9
+ * For credits and origins, see AUTHORS.
10
+ * This is a compressed file. See the sources in the 'src' directory.
11
+
12
+ ----------------------------------------------------------------------- */
13
+
14
+ /* print.css */
15
+ body {line-height:1.5;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;color:#000;background:none;font-size:10pt;}
16
+ .container {background:none;}
17
+ hr {background:#ccc;color:#ccc;width:100%;height:2px;margin:2em 0;padding:0;border:none;}
18
+ hr.space {background:#fff;color:#fff;}
19
+ h1, h2, h3, h4, h5, h6 {font-family:"Helvetica Neue", Arial, "Lucida Grande", sans-serif;}
20
+ code {font:.9em "Courier New", Monaco, Courier, monospace;}
21
+ img {float:left;margin:1.5em 1.5em 1.5em 0;}
22
+ a img {border:none;}
23
+ p img.top {margin-top:0;}
24
+ blockquote {margin:1.5em;padding:1em;font-style:italic;font-size:.9em;}
25
+ .small {font-size:.9em;}
26
+ .large {font-size:1.1em;}
27
+ .quiet {color:#999;}
28
+ .hide {display:none;}
29
+ a:link, a:visited {background:transparent;font-weight:700;text-decoration:underline;}
30
+ a:link:after, a:visited:after {content:" (" attr(href) ")";font-size:90%;}
@@ -0,0 +1,256 @@
1
+ /* -----------------------------------------------------------------------
2
+
3
+
4
+ Blueprint CSS Framework 0.9
5
+ http://blueprintcss.org
6
+
7
+ * Copyright (c) 2007-Present. See LICENSE for more info.
8
+ * See README for instructions on how to use Blueprint.
9
+ * For credits and origins, see AUTHORS.
10
+ * This is a compressed file. See the sources in the 'src' directory.
11
+
12
+ ----------------------------------------------------------------------- */
13
+
14
+ /* reset.css */
15
+ html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;}
16
+ body {line-height:1.5;}
17
+ table {border-collapse:separate;border-spacing:0;}
18
+ caption, th, td {text-align:left;font-weight:normal;}
19
+ table, td, th {vertical-align:middle;}
20
+ blockquote:before, blockquote:after, q:before, q:after {content:"";}
21
+ blockquote, q {quotes:"" "";}
22
+ a img {border:none;}
23
+
24
+ /* typography.css */
25
+ body {font-size:75%;color:#222;background:#fff;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;}
26
+ h1, h2, h3, h4, h5, h6 {font-weight:normal;color:#111;}
27
+ h1 {font-size:3em;line-height:1;margin-bottom:0.5em;}
28
+ h2 {font-size:2em;margin-bottom:0.75em;}
29
+ h3 {font-size:1.5em;line-height:1;margin-bottom:1em;}
30
+ h4 {font-size:1.2em;line-height:1.25;margin-bottom:1.25em;}
31
+ h5 {font-size:1em;font-weight:bold;margin-bottom:1.5em;}
32
+ h6 {font-size:1em;font-weight:bold;}
33
+ h1 img, h2 img, h3 img, h4 img, h5 img, h6 img {margin:0;}
34
+ p {margin:0 0 1.5em;}
35
+ p img.left {float:left;margin:1.5em 1.5em 1.5em 0;padding:0;}
36
+ p img.right {float:right;margin:1.5em 0 1.5em 1.5em;}
37
+ a:focus, a:hover {color:#000;}
38
+ a {color:#009;text-decoration:underline;}
39
+ blockquote {margin:1.5em;color:#666;font-style:italic;}
40
+ strong {font-weight:bold;}
41
+ em, dfn {font-style:italic;}
42
+ dfn {font-weight:bold;}
43
+ sup, sub {line-height:0;}
44
+ abbr, acronym {border-bottom:1px dotted #666;}
45
+ address {margin:0 0 1.5em;font-style:italic;}
46
+ del {color:#666;}
47
+ pre {margin:1.5em 0;white-space:pre;}
48
+ pre, code, tt {font:1em 'andale mono', 'lucida console', monospace;line-height:1.5;}
49
+ li ul, li ol {margin:0 1.5em;}
50
+ ul, ol {margin:0 1.5em 1.5em 1.5em;}
51
+ ul {list-style-type:disc;}
52
+ ol {list-style-type:decimal;}
53
+ dl {margin:0 0 1.5em 0;}
54
+ dl dt {font-weight:bold;}
55
+ dd {margin-left:1.5em;}
56
+ table {margin-bottom:1.4em;width:100%;}
57
+ th {font-weight:bold;}
58
+ thead th {background:#c3d9ff;}
59
+ th, td, caption {padding:4px 10px 4px 5px;}
60
+ tr.even td {background:#e5ecf9;}
61
+ tfoot {font-style:italic;}
62
+ caption {background:#eee;}
63
+ .small {font-size:.8em;margin-bottom:1.875em;line-height:1.875em;}
64
+ .large {font-size:1.2em;line-height:2.5em;margin-bottom:1.25em;}
65
+ .hide {display:none;}
66
+ .quiet {color:#666;}
67
+ .loud {color:#000;}
68
+ .highlight {background:#ff0;}
69
+ .added {background:#060;color:#fff;}
70
+ .removed {background:#900;color:#fff;}
71
+ .first {margin-left:0;padding-left:0;}
72
+ .last {margin-right:0;padding-right:0;}
73
+ .top {margin-top:0;padding-top:0;}
74
+ .bottom {margin-bottom:0;padding-bottom:0;}
75
+
76
+ /* forms.css */
77
+ label {font-weight:bold;}
78
+ fieldset {padding:1.4em;margin:0 0 1.5em 0;border:1px solid #ccc;}
79
+ legend {font-weight:bold;font-size:1.2em;}
80
+ input[type=text], input[type=password], input.text, input.title, textarea, select {background-color:#fff;border:1px solid #bbb;}
81
+ input[type=text]:focus, input[type=password]:focus, input.text:focus, input.title:focus, textarea:focus, select:focus {border-color:#666;}
82
+ input[type=text], input[type=password], input.text, input.title, textarea, select {margin:0.5em 0;}
83
+ input.text, input.title {width:300px;padding:5px;}
84
+ input.title {font-size:1.5em;}
85
+ textarea {width:390px;height:250px;padding:5px;}
86
+ input[type=checkbox], input[type=radio], input.checkbox, input.radio {position:relative;top:.25em;}
87
+ form.inline {line-height:3;}
88
+ form.inline p {margin-bottom:0;}
89
+ .error, .notice, .success {padding:.8em;margin-bottom:1em;border:2px solid #ddd;}
90
+ .error {background:#FBE3E4;color:#8a1f11;border-color:#FBC2C4;}
91
+ .notice {background:#FFF6BF;color:#514721;border-color:#FFD324;}
92
+ .success {background:#E6EFC2;color:#264409;border-color:#C6D880;}
93
+ .error a {color:#8a1f11;}
94
+ .notice a {color:#514721;}
95
+ .success a {color:#264409;}
96
+
97
+ /* grid.css */
98
+ .container {width:950px;margin:0 auto;}
99
+ .showgrid {background:url(src/grid.png);}
100
+ .column, div.span-1, div.span-2, div.span-3, div.span-4, div.span-5, div.span-6, div.span-7, div.span-8, div.span-9, div.span-10, div.span-11, div.span-12, div.span-13, div.span-14, div.span-15, div.span-16, div.span-17, div.span-18, div.span-19, div.span-20, div.span-21, div.span-22, div.span-23, div.span-24 {float:left;margin-right:10px;}
101
+ .last, div.last {margin-right:0;}
102
+ .span-1 {width:30px;}
103
+ .span-2 {width:70px;}
104
+ .span-3 {width:110px;}
105
+ .span-4 {width:150px;}
106
+ .span-5 {width:190px;}
107
+ .span-6 {width:230px;}
108
+ .span-7 {width:270px;}
109
+ .span-8 {width:310px;}
110
+ .span-9 {width:350px;}
111
+ .span-10 {width:390px;}
112
+ .span-11 {width:430px;}
113
+ .span-12 {width:470px;}
114
+ .span-13 {width:510px;}
115
+ .span-14 {width:550px;}
116
+ .span-15 {width:590px;}
117
+ .span-16 {width:630px;}
118
+ .span-17 {width:670px;}
119
+ .span-18 {width:710px;}
120
+ .span-19 {width:750px;}
121
+ .span-20 {width:790px;}
122
+ .span-21 {width:830px;}
123
+ .span-22 {width:870px;}
124
+ .span-23 {width:910px;}
125
+ .span-24, div.span-24 {width:950px;margin:0;}
126
+ input.span-1, textarea.span-1, input.span-2, textarea.span-2, input.span-3, textarea.span-3, input.span-4, textarea.span-4, input.span-5, textarea.span-5, input.span-6, textarea.span-6, input.span-7, textarea.span-7, input.span-8, textarea.span-8, input.span-9, textarea.span-9, input.span-10, textarea.span-10, input.span-11, textarea.span-11, input.span-12, textarea.span-12, input.span-13, textarea.span-13, input.span-14, textarea.span-14, input.span-15, textarea.span-15, input.span-16, textarea.span-16, input.span-17, textarea.span-17, input.span-18, textarea.span-18, input.span-19, textarea.span-19, input.span-20, textarea.span-20, input.span-21, textarea.span-21, input.span-22, textarea.span-22, input.span-23, textarea.span-23, input.span-24, textarea.span-24 {border-left-width:1px!important;border-right-width:1px!important;padding-left:5px!important;padding-right:5px!important;}
127
+ input.span-1, textarea.span-1 {width:18px!important;}
128
+ input.span-2, textarea.span-2 {width:58px!important;}
129
+ input.span-3, textarea.span-3 {width:98px!important;}
130
+ input.span-4, textarea.span-4 {width:138px!important;}
131
+ input.span-5, textarea.span-5 {width:178px!important;}
132
+ input.span-6, textarea.span-6 {width:218px!important;}
133
+ input.span-7, textarea.span-7 {width:258px!important;}
134
+ input.span-8, textarea.span-8 {width:298px!important;}
135
+ input.span-9, textarea.span-9 {width:338px!important;}
136
+ input.span-10, textarea.span-10 {width:378px!important;}
137
+ input.span-11, textarea.span-11 {width:418px!important;}
138
+ input.span-12, textarea.span-12 {width:458px!important;}
139
+ input.span-13, textarea.span-13 {width:498px!important;}
140
+ input.span-14, textarea.span-14 {width:538px!important;}
141
+ input.span-15, textarea.span-15 {width:578px!important;}
142
+ input.span-16, textarea.span-16 {width:618px!important;}
143
+ input.span-17, textarea.span-17 {width:658px!important;}
144
+ input.span-18, textarea.span-18 {width:698px!important;}
145
+ input.span-19, textarea.span-19 {width:738px!important;}
146
+ input.span-20, textarea.span-20 {width:778px!important;}
147
+ input.span-21, textarea.span-21 {width:818px!important;}
148
+ input.span-22, textarea.span-22 {width:858px!important;}
149
+ input.span-23, textarea.span-23 {width:898px!important;}
150
+ input.span-24, textarea.span-24 {width:938px!important;}
151
+ .append-1 {padding-right:40px;}
152
+ .append-2 {padding-right:80px;}
153
+ .append-3 {padding-right:120px;}
154
+ .append-4 {padding-right:160px;}
155
+ .append-5 {padding-right:200px;}
156
+ .append-6 {padding-right:240px;}
157
+ .append-7 {padding-right:280px;}
158
+ .append-8 {padding-right:320px;}
159
+ .append-9 {padding-right:360px;}
160
+ .append-10 {padding-right:400px;}
161
+ .append-11 {padding-right:440px;}
162
+ .append-12 {padding-right:480px;}
163
+ .append-13 {padding-right:520px;}
164
+ .append-14 {padding-right:560px;}
165
+ .append-15 {padding-right:600px;}
166
+ .append-16 {padding-right:640px;}
167
+ .append-17 {padding-right:680px;}
168
+ .append-18 {padding-right:720px;}
169
+ .append-19 {padding-right:760px;}
170
+ .append-20 {padding-right:800px;}
171
+ .append-21 {padding-right:840px;}
172
+ .append-22 {padding-right:880px;}
173
+ .append-23 {padding-right:920px;}
174
+ .prepend-1 {padding-left:40px;}
175
+ .prepend-2 {padding-left:80px;}
176
+ .prepend-3 {padding-left:120px;}
177
+ .prepend-4 {padding-left:160px;}
178
+ .prepend-5 {padding-left:200px;}
179
+ .prepend-6 {padding-left:240px;}
180
+ .prepend-7 {padding-left:280px;}
181
+ .prepend-8 {padding-left:320px;}
182
+ .prepend-9 {padding-left:360px;}
183
+ .prepend-10 {padding-left:400px;}
184
+ .prepend-11 {padding-left:440px;}
185
+ .prepend-12 {padding-left:480px;}
186
+ .prepend-13 {padding-left:520px;}
187
+ .prepend-14 {padding-left:560px;}
188
+ .prepend-15 {padding-left:600px;}
189
+ .prepend-16 {padding-left:640px;}
190
+ .prepend-17 {padding-left:680px;}
191
+ .prepend-18 {padding-left:720px;}
192
+ .prepend-19 {padding-left:760px;}
193
+ .prepend-20 {padding-left:800px;}
194
+ .prepend-21 {padding-left:840px;}
195
+ .prepend-22 {padding-left:880px;}
196
+ .prepend-23 {padding-left:920px;}
197
+ div.border {padding-right:4px;margin-right:5px;border-right:1px solid #eee;}
198
+ div.colborder {padding-right:24px;margin-right:25px;border-right:1px solid #eee;}
199
+ .pull-1 {margin-left:-40px;}
200
+ .pull-2 {margin-left:-80px;}
201
+ .pull-3 {margin-left:-120px;}
202
+ .pull-4 {margin-left:-160px;}
203
+ .pull-5 {margin-left:-200px;}
204
+ .pull-6 {margin-left:-240px;}
205
+ .pull-7 {margin-left:-280px;}
206
+ .pull-8 {margin-left:-320px;}
207
+ .pull-9 {margin-left:-360px;}
208
+ .pull-10 {margin-left:-400px;}
209
+ .pull-11 {margin-left:-440px;}
210
+ .pull-12 {margin-left:-480px;}
211
+ .pull-13 {margin-left:-520px;}
212
+ .pull-14 {margin-left:-560px;}
213
+ .pull-15 {margin-left:-600px;}
214
+ .pull-16 {margin-left:-640px;}
215
+ .pull-17 {margin-left:-680px;}
216
+ .pull-18 {margin-left:-720px;}
217
+ .pull-19 {margin-left:-760px;}
218
+ .pull-20 {margin-left:-800px;}
219
+ .pull-21 {margin-left:-840px;}
220
+ .pull-22 {margin-left:-880px;}
221
+ .pull-23 {margin-left:-920px;}
222
+ .pull-24 {margin-left:-960px;}
223
+ .pull-1, .pull-2, .pull-3, .pull-4, .pull-5, .pull-6, .pull-7, .pull-8, .pull-9, .pull-10, .pull-11, .pull-12, .pull-13, .pull-14, .pull-15, .pull-16, .pull-17, .pull-18, .pull-19, .pull-20, .pull-21, .pull-22, .pull-23, .pull-24 {float:left;position:relative;}
224
+ .push-1 {margin:0 -40px 1.5em 40px;}
225
+ .push-2 {margin:0 -80px 1.5em 80px;}
226
+ .push-3 {margin:0 -120px 1.5em 120px;}
227
+ .push-4 {margin:0 -160px 1.5em 160px;}
228
+ .push-5 {margin:0 -200px 1.5em 200px;}
229
+ .push-6 {margin:0 -240px 1.5em 240px;}
230
+ .push-7 {margin:0 -280px 1.5em 280px;}
231
+ .push-8 {margin:0 -320px 1.5em 320px;}
232
+ .push-9 {margin:0 -360px 1.5em 360px;}
233
+ .push-10 {margin:0 -400px 1.5em 400px;}
234
+ .push-11 {margin:0 -440px 1.5em 440px;}
235
+ .push-12 {margin:0 -480px 1.5em 480px;}
236
+ .push-13 {margin:0 -520px 1.5em 520px;}
237
+ .push-14 {margin:0 -560px 1.5em 560px;}
238
+ .push-15 {margin:0 -600px 1.5em 600px;}
239
+ .push-16 {margin:0 -640px 1.5em 640px;}
240
+ .push-17 {margin:0 -680px 1.5em 680px;}
241
+ .push-18 {margin:0 -720px 1.5em 720px;}
242
+ .push-19 {margin:0 -760px 1.5em 760px;}
243
+ .push-20 {margin:0 -800px 1.5em 800px;}
244
+ .push-21 {margin:0 -840px 1.5em 840px;}
245
+ .push-22 {margin:0 -880px 1.5em 880px;}
246
+ .push-23 {margin:0 -920px 1.5em 920px;}
247
+ .push-24 {margin:0 -960px 1.5em 960px;}
248
+ .push-1, .push-2, .push-3, .push-4, .push-5, .push-6, .push-7, .push-8, .push-9, .push-10, .push-11, .push-12, .push-13, .push-14, .push-15, .push-16, .push-17, .push-18, .push-19, .push-20, .push-21, .push-22, .push-23, .push-24 {float:right;position:relative;}
249
+ .prepend-top {margin-top:1.5em;}
250
+ .append-bottom {margin-bottom:1.5em;}
251
+ .box {padding:1.5em;margin-bottom:1.5em;background:#E5ECF9;}
252
+ hr {background:#ddd;color:#ddd;clear:both;float:none;width:100%;height:.1em;margin:0 0 1.45em;border:none;}
253
+ hr.space {background:#fff;color:#fff;}
254
+ .clearfix:after, .container:after {content:"\0020";display:block;height:0;clear:both;visibility:hidden;overflow:hidden;}
255
+ .clearfix, .container {display:block;}
256
+ .clear {clear:both;}
@@ -0,0 +1,65 @@
1
+ class <%= controller_class_name %>Controller < ApplicationController
2
+ load_and_authorize_resource
3
+ # loads all the instance variables in show, update etc.
4
+
5
+ def index
6
+ @<%= table_name %> = <%= class_name %>.find(:all)
7
+
8
+ respond_to do |format|
9
+ format.html
10
+ format.xml { render :xml => @<%= table_name %> }
11
+ end
12
+ end
13
+
14
+ def show
15
+ respond_to do |format|
16
+ format.html
17
+ format.xml { render :xml => @<%= file_name %> }
18
+ end
19
+ end
20
+
21
+ def new
22
+ respond_to do |format|
23
+ format.html
24
+ format.xml { render :xml => @<%= file_name %> }
25
+ end
26
+ end
27
+
28
+ def edit
29
+ end
30
+
31
+ def create
32
+ respond_to do |format|
33
+ if @<%= file_name %>.save
34
+ flash[:notice] = '<%= singular_name.humanize %>' + " " + t("succesful_create")
35
+ format.html { redirect_to(@<%= file_name %>) }
36
+ format.xml { render :xml => @<%= file_name %>, :status => :created, :location => @<%= file_name %> }
37
+ else
38
+ format.html { render :action => "new" }
39
+ format.xml { render :xml => @<%= file_name %>.errors, :status => :unprocessable_entity }
40
+ end
41
+ end
42
+ end
43
+
44
+ def update
45
+ respond_to do |format|
46
+ if @<%= file_name %>.update_attributes(params[:<%= file_name %>])
47
+ flash[:notice] = '<%= singular_name.humanize %>' + " " + t("succesful_update")
48
+ format.html { redirect_to(@<%= file_name %>) }
49
+ format.xml { head :ok }
50
+ else
51
+ format.html { render :action => "edit" }
52
+ format.xml { render :xml => @<%= file_name %>.errors, :status => :unprocessable_entity }
53
+ end
54
+ end
55
+ end
56
+
57
+ def destroy
58
+ @<%= file_name %>.destroy
59
+
60
+ respond_to do |format|
61
+ format.html { redirect_to(<%= table_name %>_url) }
62
+ format.xml { head :ok }
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,8 @@
1
+ <%%= form.error_messages %>
2
+
3
+ <dl>
4
+ <% for attribute in attributes -%>
5
+ <dt><%%= form.label :<%= attribute.name %> %></dt>
6
+ <dd><%%= form.<%= attribute.field_type %> :<%= attribute.name %> %></dd>
7
+ <% end -%>
8
+ </dl>
@@ -0,0 +1,12 @@
1
+ <h1> <%= t("Editing") %> <%= singular_name.humanize %></h1>
2
+
3
+ <%% form_for(@<%= singular_name %>) do |form| %>
4
+ <%%= render :partial => 'form', :locals => {:form => form} %>
5
+ <p><%%= form.submit 'Update' %></p>
6
+ <%% end %>
7
+
8
+ <p>
9
+ <%%= link_to t('show'), @<%= singular_name %> %>
10
+ |
11
+ <%%= link_to t('back'), <%= plural_name %>_path %>
12
+ </p>
@@ -0,0 +1,24 @@
1
+ <h1> <%= t("Listing") %> <%= plural_name.humanize %></h1>
2
+
3
+ <table>
4
+ <tr>
5
+ <% for attribute in attributes -%>
6
+ <th><%= attribute.column.human_name %></th>
7
+ <% end -%>
8
+ </tr>
9
+
10
+ <%% for <%= singular_name %> in @<%= plural_name %> %>
11
+ <tr>
12
+ <% for attribute in attributes -%>
13
+ <td><%%= h <%= singular_name %>.<%= attribute.name %> %></td>
14
+ <% end -%>
15
+ <td><%%= link_to t('show'), <%= singular_name %> %></td>
16
+ <td><%%= link_to t('edit'), edit_<%= singular_name %>_path(<%= singular_name %>) %></td>
17
+ <td><%%= link_to t('destroy'), <%= singular_name %>, :confirm => 'Are you sure?', :method => :delete %></td>
18
+ </tr>
19
+ <%% end %>
20
+ </table>
21
+
22
+ <%% if can? :create, attributes %>
23
+ <p><%%= link_to(t('new') + " " + '<%= singular_name.humanize %>', new_<%= singular_name %>_path) %></p>
24
+ <%% end %>
@@ -0,0 +1,22 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html>
3
+ <head>
4
+ <title><%%= "#{controller.controller_name}: #{controller.action_name}" %></title>
5
+ <%%= stylesheet_link_tag 'blueprint/screen', :media => 'screen' %>
6
+ <%%= stylesheet_link_tag 'blueprint/print', :media => 'print' %>
7
+ <%%= "<!--[if IE]>#{stylesheet_link_tag 'blueprint/ie', :media => 'screen'}<![endif]-->" %>
8
+ </head>
9
+ <body>
10
+ <div class="container">
11
+ <div id="content" class="column span-24">
12
+ <%% flash.each do |key, value| -%>
13
+ <div class="<%%= key %>">
14
+ <%%= h(value) %>
15
+ </div>
16
+ <%% end %>
17
+
18
+ <%%= yield %>
19
+ </div>
20
+ </div>
21
+ </body>
22
+ </html>