superglue 0.53.2 → 0.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/generators/rails/templates/controller.rb.tt +0 -14
- data/lib/generators/rails/templates/web/edit.html.erb +1 -1
- data/lib/generators/rails/templates/web/index.html.erb +1 -1
- data/lib/generators/rails/templates/web/new.html.erb +1 -1
- data/lib/generators/rails/templates/web/show.html.erb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0a7defe951c632a4f1f2493ad92f3ca691124986e4d6c94d718791489e1cf1ad
|
|
4
|
+
data.tar.gz: 2be2e0b8422d9f9c8c2c6f0a7e2fb2ec3cf77cd1facb1e50f0a36034236274fe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 35131fe314207a550d8921b1f93b37fcac0ada8534940ace2711d2465f741c6151d05f7fd190f72594d36877f265d3a72ba0540cc71d5757075959c5240ff374
|
|
7
|
+
data.tar.gz: c207f98aae2d03e1ce5f44fe46194c363762fde5e7113eea1907cc05727d94c5236a6e51633489f7d4b98665a3674d76a9bc594cb30e3e7eb12b4c1cef738c70
|
|
@@ -29,13 +29,8 @@ class <%= controller_class_name %>Controller < ApplicationController
|
|
|
29
29
|
@<%= singular_table_name %> = <%= orm_class.build(class_name, "#{singular_table_name}_params") %>
|
|
30
30
|
|
|
31
31
|
if @<%= orm_instance.save %>
|
|
32
|
-
<%- if options[:platform] == 'mobile' -%>
|
|
33
|
-
redirect_to <%= index_helper %>_url, notice: <%= "'#{human_name} was successfully created.'" %>
|
|
34
|
-
<%- else -%>
|
|
35
32
|
redirect_to @<%= singular_table_name %>, notice: <%= "'#{human_name} was successfully created.'" %>
|
|
36
|
-
<%- end -%>
|
|
37
33
|
else
|
|
38
|
-
response.set_header("content-location", new_<%= singular_table_name %>_path)
|
|
39
34
|
render :new
|
|
40
35
|
end
|
|
41
36
|
end
|
|
@@ -43,13 +38,8 @@ class <%= controller_class_name %>Controller < ApplicationController
|
|
|
43
38
|
# PATCH/PUT <%= route_url %>/1
|
|
44
39
|
def update
|
|
45
40
|
if @<%= orm_instance.update("#{singular_table_name}_params") %>
|
|
46
|
-
<%- if options[:platform] == 'mobile' -%>
|
|
47
|
-
redirect_to <%= index_helper %>_url, notice: <%= "'#{human_name} was successfully updated.'" %>
|
|
48
|
-
<%- else -%>
|
|
49
41
|
redirect_to @<%= singular_table_name %>, notice: <%= "'#{human_name} was successfully updated.'" %>
|
|
50
|
-
<%- end -%>
|
|
51
42
|
else
|
|
52
|
-
response.set_header("content-location", edit_<%= singular_table_name %>_path(@<%= singular_table_name %>))
|
|
53
43
|
render :edit
|
|
54
44
|
end
|
|
55
45
|
end
|
|
@@ -57,11 +47,7 @@ class <%= controller_class_name %>Controller < ApplicationController
|
|
|
57
47
|
# DELETE <%= route_url %>/1
|
|
58
48
|
def destroy
|
|
59
49
|
@<%= orm_instance.destroy %>
|
|
60
|
-
<%- if options[:platform] == 'mobile' -%>
|
|
61
|
-
redirect_to <%= index_helper %>_url, notice: <%= "'#{human_name} was successfully destroyed.'" %>
|
|
62
|
-
<%- else -%>
|
|
63
50
|
redirect_to <%= index_helper %>_url, notice: <%= "'#{human_name} was successfully destroyed.'" %>
|
|
64
|
-
<%- end -%>
|
|
65
51
|
end
|
|
66
52
|
|
|
67
53
|
private
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<%% initial_state = controller.render_to_string(active_template_virtual_path, formats: [:json], locals: local_assigns, layout: true) %>
|
|
2
2
|
|
|
3
3
|
<script type="text/javascript">
|
|
4
|
-
window.SUPERGLUE_INITIAL_PAGE_STATE=<%%= initial_state.html_safe
|
|
4
|
+
window.SUPERGLUE_INITIAL_PAGE_STATE=<%%= initial_state.html_safe %>;<%%# erblint:disable ErbSafety %>
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
7
|
<%%# If you need SSR follow instructions at %>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<%% initial_state = controller.render_to_string(active_template_virtual_path, formats: [:json], locals: local_assigns, layout: true) %>
|
|
2
2
|
|
|
3
3
|
<script type="text/javascript">
|
|
4
|
-
window.SUPERGLUE_INITIAL_PAGE_STATE=<%%= initial_state.html_safe
|
|
4
|
+
window.SUPERGLUE_INITIAL_PAGE_STATE=<%%= initial_state.html_safe %>;<%%# erblint:disable ErbSafety %>
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
7
|
<%%# If you need SSR follow instructions at %>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<%% initial_state = controller.render_to_string(active_template_virtual_path, formats: [:json], locals: local_assigns, layout: true) %>
|
|
2
2
|
|
|
3
3
|
<script type="text/javascript">
|
|
4
|
-
window.SUPERGLUE_INITIAL_PAGE_STATE=<%%= initial_state.html_safe
|
|
4
|
+
window.SUPERGLUE_INITIAL_PAGE_STATE=<%%= initial_state.html_safe %>;<%%# erblint:disable ErbSafety %>
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
7
|
<%%# If you need SSR follow instructions at %>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<%% initial_state = controller.render_to_string(active_template_virtual_path, formats: [:json], locals: local_assigns, layout: true) %>
|
|
2
2
|
|
|
3
3
|
<script type="text/javascript">
|
|
4
|
-
window.SUPERGLUE_INITIAL_PAGE_STATE=<%%= initial_state.html_safe
|
|
4
|
+
window.SUPERGLUE_INITIAL_PAGE_STATE=<%%= initial_state.html_safe %>;<%%# erblint:disable ErbSafety %>
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
7
|
<%%# If you need SSR follow instructions at %>
|
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.54.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: 2024-
|
|
11
|
+
date: 2024-10-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: actionpack
|