hot-glue 0.4.9 → 0.4.9.1
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/Gemfile.lock +1 -1
- data/lib/generators/hot_glue/templates/controller.rb.erb +3 -3
- data/lib/hotglue/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bdbd3dc1b80457ca68ba5bc2b3bf97ae1c2001e145c09d8d527c788ad86fa1ee
|
|
4
|
+
data.tar.gz: 2b0bf49dd1828de1a31d221163370bf7fe4042f20593036676ac580cadd209dc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f2109863ad2f6a06faee8972d49dd4263b04a91adecde2b084b93a3490c2f270a3131f4306113ecea2b9e673758d58d03ba59f8eb62f5e412968d3be7329ef1f
|
|
7
|
+
data.tar.gz: e4989cc116e44d9e04bd588f65c6080e932e02fb8dcc201f010e0e16adfa76b143dd5a82c3829897acca7eab9b669c9d5541d5f96988ef2ee391f502938cadd6
|
data/Gemfile.lock
CHANGED
|
@@ -52,12 +52,12 @@ class <%= controller_class_name %> < <%= controller_descends_from %>
|
|
|
52
52
|
end
|
|
53
53
|
<% else %>
|
|
54
54
|
def load_<%= singular_name %>
|
|
55
|
-
@<%= singular_name %> = (<%= auth_object.gsub("@",'') %><%= " if params.include?(:#{@nested_set[0][:singular]}_id)" if @nested_set[0][:optional] %>)<% if @nested_set[0][:optional] %> || <%= class_name %>.find(params[:id])<% end %>
|
|
55
|
+
@<%= singular_name %> = (<%= auth_object.gsub("@",'') %><%= " if params.include?(:#{@nested_set[0][:singular]}_id)" if @nested_set.any? && @nested_set[0][:optional] %>)<% if @nested_set.any? && @nested_set[0][:optional] %> || <%= class_name %>.find(params[:id])<% end %>
|
|
56
56
|
end<% end %>
|
|
57
57
|
|
|
58
58
|
def load_all_<%= plural %> <% if !@self_auth %>
|
|
59
|
-
@<%= plural_name %> = ( <%= object_scope.gsub("@",'') %>.page(params[:page])<%= n_plus_one_includes %><%= " if params.include?(:#{ @nested_set.last[:singular]}_id)" if @nested_set[0] && @nested_set[0][:optional] %>) <% if @nested_set[0] && @nested_set[0][:optional] %> || <%= class_name %>.all<% end %> <% else %>
|
|
60
|
-
@<%= plural_name %> = <%= class_name %>.where(id: <%= auth_object.gsub("@",'') %>.id)<%= n_plus_one_includes %> # returns iterable even though this <%= singular_name %> is
|
|
59
|
+
@<%= plural_name %> = ( <%= object_scope.gsub("@",'') %>.page(params[:page])<%= n_plus_one_includes %><%= " if params.include?(:#{ @nested_set.last[:singular]}_id)" if @nested_set.any? && @nested_set[0] && @nested_set[0][:optional] %>) <% if @nested_set[0] && @nested_set[0][:optional] %> || <%= class_name %>.all<% end %> <% else %>
|
|
60
|
+
@<%= plural_name %> = <%= class_name %>.where(id: <%= auth_object.gsub("@",'') %>.id)<%= n_plus_one_includes %> # returns iterable even though this <%= singular_name %> is only allowed access to themselves<% end %>
|
|
61
61
|
end
|
|
62
62
|
|
|
63
63
|
def index
|
data/lib/hotglue/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hot-glue
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.9
|
|
4
|
+
version: 0.4.9.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jason Fleetwood-Boldt
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-02-
|
|
11
|
+
date: 2022-02-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
149
149
|
- !ruby/object:Gem::Version
|
|
150
150
|
version: '0'
|
|
151
151
|
requirements: []
|
|
152
|
-
rubygems_version: 3.1.
|
|
152
|
+
rubygems_version: 3.1.4
|
|
153
153
|
signing_key:
|
|
154
154
|
specification_version: 4
|
|
155
155
|
summary: A gem to build Tubro Rails scaffolding.
|