superglue 0.50.0 → 0.51.0
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: 7d03545c395b4dd5b754bde95143e8c14a142a7f8e1c325a35c4d21e44369b8a
|
4
|
+
data.tar.gz: cb628055a7749b3ee5555ad9c41e0f4e028e34620b94bdb24576b19501764656
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d48a08bda50eded3e06ccf78b41f96b8b9428b6dc35727771d8932ace02527bc9edd8d170efeb9cc2a515d62ec0c41d7b92aebbc2e959625aafd49f7945e1f24
|
7
|
+
data.tar.gz: 79b81bcabd4b28931d3bca92d35bc0e3ca660d61f9710aa4282574af61749faabb2c06e5a33957ea001d013d7c11068fc9b87e49f950ab9f81590a01a7f5eb6f
|
@@ -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.0
|
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
|