super 0.0.1 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +11 -0
  3. data/README.md +64 -78
  4. data/Rakefile +3 -1
  5. data/app/assets/config/super_manifest.js +2 -1
  6. data/app/assets/javascripts/super/application.js +1252 -316
  7. data/app/assets/stylesheets/super/application.css +102704 -17321
  8. data/app/controllers/super/application_controller.rb +50 -42
  9. data/app/helpers/super/application_helper.rb +39 -0
  10. data/app/views/layouts/super/application.html.erb +11 -7
  11. data/app/views/super/application/_collection_header.html.erb +15 -0
  12. data/app/views/super/application/_flash.html.erb +17 -0
  13. data/app/views/super/application/_form_field__destroy.html.erb +9 -0
  14. data/app/views/super/application/_form_field_select.html.erb +23 -0
  15. data/app/views/super/application/_form_field_text.html.erb +13 -0
  16. data/app/views/super/application/_form_fieldset.html.erb +8 -0
  17. data/app/views/super/application/_form_has_many.html.erb +21 -0
  18. data/app/views/super/application/_form_has_one.html.erb +11 -0
  19. data/app/views/super/application/_form_inline_errors.html.erb +10 -0
  20. data/app/views/super/application/_member_header.html.erb +16 -0
  21. data/app/views/super/application/_super_layout.html.erb +29 -0
  22. data/app/views/super/application/_super_panel.html.erb +7 -0
  23. data/app/views/super/application/_super_schema_display_actions.html.erb +5 -0
  24. data/app/views/super/application/_super_schema_display_index.html.erb +39 -0
  25. data/app/views/super/application/_super_schema_display_show.html.erb +8 -0
  26. data/app/views/super/application/_super_schema_form.html.erb +15 -0
  27. data/app/views/super/application/edit.html.erb +4 -5
  28. data/app/views/super/application/index.html.erb +6 -1
  29. data/app/views/super/application/new.html.erb +4 -5
  30. data/app/views/super/application/nothing.html.erb +0 -0
  31. data/app/views/super/application/show.html.erb +6 -10
  32. data/app/views/super/feather/{_chevron_down.svg → _chevron_down.html} +0 -0
  33. data/config/locales/en.yml +5 -0
  34. data/docs/README.md +6 -0
  35. data/docs/cheat.md +41 -0
  36. data/docs/faq.md +44 -0
  37. data/docs/quick_start.md +45 -0
  38. data/docs/webpacker.md +17 -0
  39. data/docs/yard_customizations.rb +41 -0
  40. data/frontend/super-frontend/build.js +14 -12
  41. data/frontend/super-frontend/dist/application.css +102704 -17321
  42. data/frontend/super-frontend/dist/application.js +1252 -316
  43. data/frontend/super-frontend/package.json +11 -4
  44. data/frontend/super-frontend/postcss.config.js +4 -4
  45. data/frontend/super-frontend/src/javascripts/super/application.ts +18 -0
  46. data/frontend/super-frontend/src/javascripts/super/apply_template_controller.ts +19 -0
  47. data/frontend/super-frontend/src/javascripts/super/rails__ujs.d.ts +1 -0
  48. data/frontend/super-frontend/src/javascripts/super/toggle_pending_destruction_controller.ts +15 -0
  49. data/frontend/super-frontend/src/stylesheets/super/application.css +63 -0
  50. data/frontend/super-frontend/tailwind.config.js +12 -4
  51. data/frontend/super-frontend/tsconfig.json +13 -0
  52. data/frontend/super-frontend/yarn.lock +1891 -1798
  53. data/lib/generators/super/install/USAGE +4 -2
  54. data/lib/generators/super/install/install_generator.rb +18 -3
  55. data/lib/generators/super/resource/USAGE +1 -2
  56. data/lib/generators/super/resource/resource_generator.rb +0 -2
  57. data/lib/generators/super/resource/templates/resources_controller.rb.tt +38 -2
  58. data/lib/generators/super/webpacker/webpacker_generator.rb +8 -0
  59. data/lib/super.rb +10 -5
  60. data/lib/super/action_inquirer.rb +101 -0
  61. data/lib/super/assets.rb +1 -0
  62. data/lib/super/client_error.rb +43 -0
  63. data/lib/super/compatibility.rb +13 -0
  64. data/lib/super/configuration.rb +60 -45
  65. data/lib/super/controls.rb +26 -15
  66. data/lib/super/controls/optional.rb +65 -0
  67. data/lib/super/controls/required.rb +41 -0
  68. data/lib/super/controls/steps.rb +115 -0
  69. data/lib/super/display/schema_types.rb +60 -18
  70. data/lib/super/engine.rb +1 -0
  71. data/lib/super/error.rb +10 -1
  72. data/lib/super/form.rb +48 -0
  73. data/lib/super/form/schema_types.rb +96 -21
  74. data/lib/super/layout.rb +47 -0
  75. data/lib/super/link.rb +110 -0
  76. data/lib/super/navigation/automatic.rb +2 -0
  77. data/lib/super/pagination.rb +19 -8
  78. data/lib/super/panel.rb +30 -0
  79. data/lib/super/partial.rb +11 -0
  80. data/lib/super/partial/resolving.rb +24 -0
  81. data/lib/super/schema.rb +64 -1
  82. data/lib/super/version.rb +1 -1
  83. data/lib/super/view_helper.rb +43 -0
  84. metadata +145 -38
  85. data/app/views/super/application/_form.html.erb +0 -13
  86. data/app/views/super/application/_form_field.html.erb +0 -7
  87. data/app/views/super/application/_form_generic_select.html.erb +0 -19
  88. data/app/views/super/application/_form_generic_text.html.erb +0 -7
  89. data/app/views/super/application/_index.html.erb +0 -58
  90. data/frontend/super-frontend/src/javascripts/super/application.js +0 -11
  91. data/lib/generators/super/resource/templates/resource_dashboard.rb.tt +0 -65
  92. data/lib/super/display.rb +0 -9
  93. data/lib/super/inline_callback.rb +0 -82
  94. data/lib/super/test_support/fixtures/members.yml +0 -336
  95. data/lib/super/test_support/fixtures/ships.yml +0 -10
  96. data/lib/super/test_support/setup.rb +0 -79
  97. data/lib/super/test_support/starfleet_seeder.rb +0 -49
  98. data/lib/super/test_support/templates/20190216224956_create_members.rb +0 -11
  99. data/lib/super/test_support/templates/20190803143320_create_ships.rb +0 -11
  100. data/lib/super/test_support/templates/20190806014121_add_ship_to_members.rb +0 -5
  101. data/lib/super/test_support/templates/admin/members_controller.rb +0 -9
  102. data/lib/super/test_support/templates/admin/ships_controller.rb +0 -9
  103. data/lib/super/test_support/templates/admin_controller.rb +0 -2
  104. data/lib/super/test_support/templates/member.rb +0 -16
  105. data/lib/super/test_support/templates/member_dashboard.rb +0 -90
  106. data/lib/super/test_support/templates/routes.rb +0 -10
  107. data/lib/super/test_support/templates/seeds.rb +0 -2
  108. data/lib/super/test_support/templates/ship.rb +0 -3
  109. data/lib/super/test_support/templates/ship_dashboard.rb +0 -79
  110. data/lib/super/view.rb +0 -25
  111. data/lib/tasks/super_tasks.rake +0 -4
@@ -1,3 +1,3 @@
1
1
  module Super
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -0,0 +1,43 @@
1
+ module Super
2
+ module ViewHelper
3
+ module_function
4
+
5
+ # For example, calling `classes("always", ["sometimes", condition])` would
6
+ # return the string "always sometimes" or "always"
7
+ def classes(*list)
8
+ result = list.map do |c|
9
+ case c
10
+ when String
11
+ c
12
+ when Array
13
+ if c.size != 2
14
+ raise %(Expected exactly two elements (["class", some_condition]), got: #{c.inspect})
15
+ end
16
+
17
+ c.first if c.last
18
+ end
19
+ end
20
+
21
+ result.compact.join(" ")
22
+ end
23
+
24
+ def errors_accounting_for_reflections(model_instance, column_or_association)
25
+ errable_fields(model_instance, column_or_association)
26
+ .flat_map { |field| Compatability.rails_50_errable_fields(field) }
27
+ .flat_map { |field| model_instance.errors.full_messages_for(field) }
28
+ .uniq
29
+ end
30
+
31
+ def errable_fields(model_instance, column_or_association)
32
+ column_or_association = column_or_association.to_s
33
+ reflection = model_instance.class.reflect_on_association(column_or_association)
34
+ reflection ||= model_instance.class.reflections.values.find { |r| r.foreign_key == column_or_association }
35
+
36
+ if reflection
37
+ [reflection.name.to_s, reflection.foreign_key.to_s]
38
+ else
39
+ [column_or_association]
40
+ end
41
+ end
42
+ end
43
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: super
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zach Ahn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-18 00:00:00.000000000 Z
11
+ date: 2020-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -28,30 +28,78 @@ dependencies:
28
28
  name: capybara
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.18'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '3.18'
41
+ - !ruby/object:Gem::Dependency
42
+ name: selenium-webdriver
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.142'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.142'
55
+ - !ruby/object:Gem::Dependency
56
+ name: webdrivers
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '4.3'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '4.3'
69
+ - !ruby/object:Gem::Dependency
70
+ name: puma
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '4.3'
31
76
  - - ">="
32
77
  - !ruby/object:Gem::Version
33
- version: '0'
78
+ version: 4.3.6
34
79
  type: :development
35
80
  prerelease: false
36
81
  version_requirements: !ruby/object:Gem::Requirement
37
82
  requirements:
83
+ - - "~>"
84
+ - !ruby/object:Gem::Version
85
+ version: '4.3'
38
86
  - - ">="
39
87
  - !ruby/object:Gem::Version
40
- version: '0'
88
+ version: 4.3.6
41
89
  - !ruby/object:Gem::Dependency
42
90
  name: sqlite3
43
91
  requirement: !ruby/object:Gem::Requirement
44
92
  requirements:
45
- - - "~>"
93
+ - - ">="
46
94
  - !ruby/object:Gem::Version
47
- version: 1.3.6
95
+ version: '0'
48
96
  type: :development
49
97
  prerelease: false
50
98
  version_requirements: !ruby/object:Gem::Requirement
51
99
  requirements:
52
- - - "~>"
100
+ - - ">="
53
101
  - !ruby/object:Gem::Version
54
- version: 1.3.6
102
+ version: '0'
55
103
  - !ruby/object:Gem::Dependency
56
104
  name: pry
57
105
  requirement: !ruby/object:Gem::Requirement
@@ -94,6 +142,48 @@ dependencies:
94
142
  - - ">="
95
143
  - !ruby/object:Gem::Version
96
144
  version: '0'
145
+ - !ruby/object:Gem::Dependency
146
+ name: yard
147
+ requirement: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ">="
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ type: :development
153
+ prerelease: false
154
+ version_requirements: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - ">="
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
159
+ - !ruby/object:Gem::Dependency
160
+ name: mocha
161
+ requirement: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - ">="
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
166
+ type: :development
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ version: '0'
173
+ - !ruby/object:Gem::Dependency
174
+ name: i18n-debug
175
+ requirement: !ruby/object:Gem::Requirement
176
+ requirements:
177
+ - - ">="
178
+ - !ruby/object:Gem::Version
179
+ version: '0'
180
+ type: :development
181
+ prerelease: false
182
+ version_requirements: !ruby/object:Gem::Requirement
183
+ requirements:
184
+ - - ">="
185
+ - !ruby/object:Gem::Version
186
+ version: '0'
97
187
  description:
98
188
  email:
99
189
  - engineering@zachahn.com
@@ -101,6 +191,7 @@ executables: []
101
191
  extensions: []
102
192
  extra_rdoc_files: []
103
193
  files:
194
+ - ".yardopts"
104
195
  - LICENSE
105
196
  - README.md
106
197
  - Rakefile
@@ -108,27 +199,51 @@ files:
108
199
  - app/assets/javascripts/super/application.js
109
200
  - app/assets/stylesheets/super/application.css
110
201
  - app/controllers/super/application_controller.rb
202
+ - app/helpers/super/application_helper.rb
111
203
  - app/views/layouts/super/application.html.erb
112
- - app/views/super/application/_form.html.erb
113
- - app/views/super/application/_form_field.html.erb
114
- - app/views/super/application/_form_generic_select.html.erb
115
- - app/views/super/application/_form_generic_text.html.erb
116
- - app/views/super/application/_index.html.erb
204
+ - app/views/super/application/_collection_header.html.erb
205
+ - app/views/super/application/_flash.html.erb
206
+ - app/views/super/application/_form_field__destroy.html.erb
207
+ - app/views/super/application/_form_field_select.html.erb
208
+ - app/views/super/application/_form_field_text.html.erb
209
+ - app/views/super/application/_form_fieldset.html.erb
210
+ - app/views/super/application/_form_has_many.html.erb
211
+ - app/views/super/application/_form_has_one.html.erb
212
+ - app/views/super/application/_form_inline_errors.html.erb
213
+ - app/views/super/application/_member_header.html.erb
214
+ - app/views/super/application/_super_layout.html.erb
215
+ - app/views/super/application/_super_panel.html.erb
216
+ - app/views/super/application/_super_schema_display_actions.html.erb
217
+ - app/views/super/application/_super_schema_display_index.html.erb
218
+ - app/views/super/application/_super_schema_display_show.html.erb
219
+ - app/views/super/application/_super_schema_form.html.erb
117
220
  - app/views/super/application/edit.html.erb
118
221
  - app/views/super/application/index.html.erb
119
222
  - app/views/super/application/new.html.erb
223
+ - app/views/super/application/nothing.html.erb
120
224
  - app/views/super/application/show.html.erb
121
225
  - app/views/super/feather/README.md
122
- - app/views/super/feather/_chevron_down.svg
226
+ - app/views/super/feather/_chevron_down.html
227
+ - config/locales/en.yml
123
228
  - config/routes.rb
229
+ - docs/README.md
230
+ - docs/cheat.md
231
+ - docs/faq.md
232
+ - docs/quick_start.md
233
+ - docs/webpacker.md
234
+ - docs/yard_customizations.rb
124
235
  - frontend/super-frontend/build.js
125
236
  - frontend/super-frontend/dist/application.css
126
237
  - frontend/super-frontend/dist/application.js
127
238
  - frontend/super-frontend/package.json
128
239
  - frontend/super-frontend/postcss.config.js
129
- - frontend/super-frontend/src/javascripts/super/application.js
240
+ - frontend/super-frontend/src/javascripts/super/application.ts
241
+ - frontend/super-frontend/src/javascripts/super/apply_template_controller.ts
242
+ - frontend/super-frontend/src/javascripts/super/rails__ujs.d.ts
243
+ - frontend/super-frontend/src/javascripts/super/toggle_pending_destruction_controller.ts
130
244
  - frontend/super-frontend/src/stylesheets/super/application.css
131
245
  - frontend/super-frontend/tailwind.config.js
246
+ - frontend/super-frontend/tsconfig.json
132
247
  - frontend/super-frontend/yarn.lock
133
248
  - lib/generators/super/install/USAGE
134
249
  - lib/generators/super/install/install_generator.rb
@@ -136,44 +251,36 @@ files:
136
251
  - lib/generators/super/install/templates/initializer.rb.tt
137
252
  - lib/generators/super/resource/USAGE
138
253
  - lib/generators/super/resource/resource_generator.rb
139
- - lib/generators/super/resource/templates/resource_dashboard.rb.tt
140
254
  - lib/generators/super/resource/templates/resources_controller.rb.tt
141
255
  - lib/generators/super/webpacker/USAGE
142
256
  - lib/generators/super/webpacker/templates/pack_super_application.js.erb.tt
143
257
  - lib/generators/super/webpacker/webpacker_generator.rb
144
258
  - lib/super.rb
259
+ - lib/super/action_inquirer.rb
145
260
  - lib/super/assets.rb
261
+ - lib/super/client_error.rb
262
+ - lib/super/compatibility.rb
146
263
  - lib/super/configuration.rb
147
264
  - lib/super/controls.rb
148
- - lib/super/display.rb
265
+ - lib/super/controls/optional.rb
266
+ - lib/super/controls/required.rb
267
+ - lib/super/controls/steps.rb
149
268
  - lib/super/display/schema_types.rb
150
269
  - lib/super/engine.rb
151
270
  - lib/super/error.rb
271
+ - lib/super/form.rb
152
272
  - lib/super/form/schema_types.rb
153
- - lib/super/inline_callback.rb
273
+ - lib/super/layout.rb
274
+ - lib/super/link.rb
154
275
  - lib/super/navigation/automatic.rb
155
276
  - lib/super/pagination.rb
277
+ - lib/super/panel.rb
278
+ - lib/super/partial.rb
279
+ - lib/super/partial/resolving.rb
156
280
  - lib/super/plugin.rb
157
281
  - lib/super/schema.rb
158
- - lib/super/test_support/fixtures/members.yml
159
- - lib/super/test_support/fixtures/ships.yml
160
- - lib/super/test_support/setup.rb
161
- - lib/super/test_support/starfleet_seeder.rb
162
- - lib/super/test_support/templates/20190216224956_create_members.rb
163
- - lib/super/test_support/templates/20190803143320_create_ships.rb
164
- - lib/super/test_support/templates/20190806014121_add_ship_to_members.rb
165
- - lib/super/test_support/templates/admin/members_controller.rb
166
- - lib/super/test_support/templates/admin/ships_controller.rb
167
- - lib/super/test_support/templates/admin_controller.rb
168
- - lib/super/test_support/templates/member.rb
169
- - lib/super/test_support/templates/member_dashboard.rb
170
- - lib/super/test_support/templates/routes.rb
171
- - lib/super/test_support/templates/seeds.rb
172
- - lib/super/test_support/templates/ship.rb
173
- - lib/super/test_support/templates/ship_dashboard.rb
174
282
  - lib/super/version.rb
175
- - lib/super/view.rb
176
- - lib/tasks/super_tasks.rake
283
+ - lib/super/view_helper.rb
177
284
  homepage:
178
285
  licenses:
179
286
  - LGPL-3.0-only
@@ -193,8 +300,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
300
  - !ruby/object:Gem::Version
194
301
  version: '0'
195
302
  requirements: []
196
- rubygems_version: 3.0.3
303
+ rubygems_version: 3.1.4
197
304
  signing_key:
198
305
  specification_version: 4
199
- summary: A simple, powerful, single dependency Rails admin framework
306
+ summary: A simple, powerful, zero dependency Rails admin framework
200
307
  test_files: []
@@ -1,13 +0,0 @@
1
- <%= form_for(Super.configuration.path_parts(resource)) do |f| %>
2
- <% schema.fields.each do |field, type| %>
3
- <%= render(
4
- type,
5
- form: f,
6
- column: field,
7
- resource: resource
8
- ) %>
9
- <% end %>
10
- <div>
11
- <%= f.submit class: "bg-blue-700 hover:bg-blue-800 text-white py-2 px-4 rounded mt-2" %>
12
- </div>
13
- <% end %>
@@ -1,7 +0,0 @@
1
- <div class="lg:w-1/3">
2
- <%= f.label column %>
3
- <%= f.text_field column, class: "appearance-none border rounded w-full py-2 px-2 text-gray-900 leading-tight border border-gray-400 focus:border-blue-400 mt-2" %>
4
- <% resource.errors.full_messages_for(column).each do |error_message| %>
5
- <p class="text-red-400 text-xs italic pt-1"><%= error_message %></p>
6
- <% end %>
7
- </div>
@@ -1,19 +0,0 @@
1
- <div class="lg:w-1/3">
2
- <%= form.label(column) %>
3
- <div class="relative mt-2">
4
- <%= form.select(
5
- column,
6
- form_generic_select[:collection],
7
- { include_blank: true },
8
- { class: "appearance-none border rounded w-full py-2 px-2 text-gray-900 leading-tight border border-gray-400 focus:border-blue-400 block" }
9
- ) %>
10
- <div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700">
11
- <span class="fill-current h-4 w-4">
12
- <%= render "super/feather/chevron_down.svg" %>
13
- </span>
14
- </div>
15
- </div>
16
- <% resource.errors.full_messages_for(column).each do |error_message| %>
17
- <p class="text-red-400 text-xs italic pt-1"><%= error_message %></p>
18
- <% end %>
19
- </div>
@@ -1,7 +0,0 @@
1
- <div class="lg:w-1/3">
2
- <%= form.label(column) %>
3
- <%= form.text_field(column, class: "appearance-none border rounded w-full py-2 px-2 text-gray-900 leading-tight border border-gray-400 focus:border-blue-400 mt-2") %>
4
- <% resource.errors.full_messages_for(column).each do |error_message| %>
5
- <p class="text-red-400 text-xs italic pt-1"><%= error_message %></p>
6
- <% end %>
7
- </div>
@@ -1,58 +0,0 @@
1
- <% content_for(:header) do %>
2
- <header>
3
- <h1 class="text-3xl inline-block">
4
- <%= controls.title %>
5
- </h1>
6
- <%= link_to(
7
- "New #{controls.model.name}",
8
- new_polymorphic_path(Super.configuration.path_parts(controls.model.new)),
9
- class: "inline-block"
10
- ) %>
11
- </header>
12
- <% end %>
13
-
14
- <table class="w-full leading-loose mt-4">
15
- <thead class="border-gray-400 border-solid">
16
- <tr>
17
- <% (controls.index_schema.field_keys + ["Actions"]).each do |column| %>
18
- <th class="text-left"><%= column.to_s.humanize %></th>
19
- <% end %>
20
- </tr>
21
- </thead>
22
- <tbody>
23
- <% @resources.each.with_index do |resource, index| %>
24
- <tr id="resource-pk-<%= resource.id %>" class="<%= index.even? ? "bg-gray-100" : "" %>" >
25
- <% controls.index_schema.field_keys.each do |column| %>
26
- <td><%= Super::Display.format(controls.index_schema, resource, column) %></td>
27
- <% end %>
28
- <td>
29
- <%= link_to(
30
- "View",
31
- polymorphic_path(Super.configuration.path_parts(resource))
32
- ) %>
33
- <%= link_to(
34
- "Edit",
35
- edit_polymorphic_path(Super.configuration.path_parts(resource))
36
- ) %>
37
- <%= link_to(
38
- "Delete",
39
- polymorphic_path(Super.configuration.path_parts(resource)),
40
- method: :delete,
41
- data: { confirm: "Really delete?" }
42
- ) %>
43
- </td>
44
- </tr>
45
- <% end %>
46
- </tbody>
47
- </table>
48
-
49
- <% @pagination.each do |page_query_params, is_current_page, display| %>
50
- <%= link_to(
51
- display,
52
- polymorphic_path(
53
- Super.configuration.path_parts(controls.model),
54
- page_query_params
55
- ),
56
- class: "#{is_current_page ? " text-gray-900" : ""}"
57
- ) %>
58
- <% end %>
@@ -1,11 +0,0 @@
1
- import RailsUjs from 'rails-ujs';
2
- import { Application, Controller } from 'stimulus';
3
-
4
- RailsUjs.start();
5
-
6
- const application = Application.start()
7
-
8
- export default {
9
- StimulusApplication: application,
10
- StimulusController: Controller,
11
- };