superglue 0.50.0 → 0.51.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/rails/templates/edit.json.props +2 -2
- data/lib/generators/rails/templates/index.json.props +6 -7
- data/lib/generators/rails/templates/new.json.props +1 -1
- data/lib/generators/rails/templates/show.json.props +3 -4
- data/lib/generators/rails/templates/web/edit.html.erb +4 -6
- data/lib/generators/rails/templates/web/index.html.erb +2 -0
- data/lib/generators/rails/templates/web/new.html.erb +2 -0
- data/lib/generators/rails/templates/web/show.html.erb +2 -0
- data/lib/install/templates/web/application.json.props +4 -4
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efd81fc43cbc5289dcb49d1a8491814d0074e59e3a6eaba4c574c8e79b0e0ad4
|
4
|
+
data.tar.gz: e897edd52736ba816f661b3638484bea2131cb3ec76b2ef17293ae8dcfad39de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc312d60b4dbe09ec16c419362d519ca5439ac2a52d6535fb5dd2cef8c0a978979e5bb8774eedb6d11d5205a067c82f2780d483ee96a5725e3fed96865f8c888
|
7
|
+
data.tar.gz: 7a2a41329a34fd01fe4ee765b04968135ae8e7e606ec15d9080437ea679378aa4fd6d1661f8b8a2f6a2f8d9a325e39baaea156f3cd25ce41f4036fd7ac774237
|
@@ -8,5 +8,5 @@ end
|
|
8
8
|
json.form(partial: 'form') do
|
9
9
|
end
|
10
10
|
|
11
|
-
json.<%= singular_table_name%>
|
12
|
-
json.<%= plural_table_name %>
|
11
|
+
json.<%= singular_table_name.camelize(:lower)%>Path <%= singular_table_name%>_path(@<%=singular_table_name%>)
|
12
|
+
json.<%= plural_table_name.camelize(:lower) %>Path <%= plural_table_name %>_path
|
@@ -1,15 +1,14 @@
|
|
1
|
-
json.<%= plural_table_name %> do
|
1
|
+
json.<%= plural_table_name.camelize(:lower) %> do
|
2
2
|
json.array! @<%= plural_table_name %> do |<%= singular_table_name %>|
|
3
3
|
<%- attributes_list_with_timestamps.each do |attr| -%>
|
4
|
-
json.<%=attr%> <%= singular_table_name %>.<%=attr%>
|
4
|
+
json.<%=attr%> <%= singular_table_name.camelize(:lower) %>.<%=attr%>
|
5
5
|
<%- end -%>
|
6
|
-
json.
|
7
|
-
json.<%=singular_table_name%>
|
8
|
-
json.
|
6
|
+
json.edit<%=singular_table_name.camelize%>Path edit_<%=singular_table_name%>_path(<%=singular_table_name%>)
|
7
|
+
json.<%=singular_table_name.camelize(:lower)%>Path <%=singular_table_name%>_path(<%=singular_table_name%>)
|
8
|
+
json.deleteForm do
|
9
9
|
form_props(model: <%=singular_table_name%>, method: :delete)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
|
-
|
15
|
-
json.new_<%= singular_table_name %>_path new_<%= singular_table_name %>_path
|
14
|
+
json.new<%= singular_table_name.camelize %>Path new_<%= singular_table_name %>_path
|
@@ -1,7 +1,6 @@
|
|
1
1
|
<%- attributes_list_with_timestamps.each do |attr|-%>
|
2
|
-
json.<%=attr%> @<%= singular_table_name %>.<%=attr%>
|
2
|
+
json.<%=attr.to_s.camelize(:lower)%> @<%= singular_table_name %>.<%=attr%>
|
3
3
|
<%- end -%>
|
4
4
|
|
5
|
-
|
6
|
-
json
|
7
|
-
json.edit_<%= singular_table_name %>_path edit_<%= singular_table_name %>_path(@<%= singular_table_name %>)
|
5
|
+
json.<%= plural_table_name.camelize(:lower) %>Path <%= plural_table_name %>_path
|
6
|
+
json.edit<%= singular_table_name.camelize %>Path edit_<%= singular_table_name %>_path(@<%= singular_table_name %>)
|
@@ -4,9 +4,7 @@
|
|
4
4
|
window.SUPERGLUE_INITIAL_PAGE_STATE=<%%= initial_state.html_safe %>;
|
5
5
|
</script>
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
<%%#= Humid.render(initial_state).html_safe %>
|
12
|
-
</div>
|
7
|
+
<%%# If you need SSR follow instructions at %>
|
8
|
+
<%%# https://github.com/thoughtbot/superglue/blob/main/docs/recipes/server-side-rendering.md %>
|
9
|
+
<div id="app"></div>
|
10
|
+
|
@@ -4,13 +4,13 @@ json.data(search: path) do
|
|
4
4
|
yield json
|
5
5
|
end
|
6
6
|
|
7
|
-
json.
|
7
|
+
json.componentIdentifier virtual_path_of_template
|
8
8
|
json.defers json.deferred!
|
9
9
|
json.fragments json.fragments!
|
10
10
|
json.assets [ asset_path('application.js') ]
|
11
11
|
|
12
12
|
if protect_against_forgery?
|
13
|
-
json.
|
13
|
+
json.csrfToken form_authenticity_token
|
14
14
|
end
|
15
15
|
|
16
16
|
if path
|
@@ -18,9 +18,9 @@ if path
|
|
18
18
|
json.path search_path_to_camelized_param(path)
|
19
19
|
end
|
20
20
|
|
21
|
-
json.
|
21
|
+
json.restoreStrategy 'fromCacheAndRevisitInBackground'
|
22
22
|
|
23
|
-
json.
|
23
|
+
json.renderedAt Time.now.to_i
|
24
24
|
|
25
25
|
json.slices do
|
26
26
|
json.flash flash.to_h
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: superglue
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.51.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johny Ho
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -30,28 +30,28 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.30.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.30.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: form_props
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.0.
|
47
|
+
version: 0.0.5
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.0.
|
54
|
+
version: 0.0.5
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: activerecord
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|