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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a742ee0c02993ed08614aafae1af82e86528f002b69a7213c8cd731518b14df3
4
- data.tar.gz: 6bd0941019c42f2ce0eee5d94447098b748a0475726efd53554c1f62f3051f2f
3
+ metadata.gz: bdbd3dc1b80457ca68ba5bc2b3bf97ae1c2001e145c09d8d527c788ad86fa1ee
4
+ data.tar.gz: 2b0bf49dd1828de1a31d221163370bf7fe4042f20593036676ac580cadd209dc
5
5
  SHA512:
6
- metadata.gz: 4bdfa2cdfbf27a138d53be2455df509345ec20f0f37d047a67e77d7365fff543a76e41504f3a1699a6eb24056ad939e55254ec6b4195c8647734d4b7f6eb288a
7
- data.tar.gz: d123bf48ca0e1beb4eacdceeee934aaca4b6e6c6284a2c0c3f09e39caab94e9561bea7ccd8fcb92d6c8942df5ae855958270d2a8726a06dc3875fbfa6ec7b7d8
6
+ metadata.gz: f2109863ad2f6a06faee8972d49dd4263b04a91adecde2b084b93a3490c2f270a3131f4306113ecea2b9e673758d58d03ba59f8eb62f5e412968d3be7329ef1f
7
+ data.tar.gz: e4989cc116e44d9e04bd588f65c6080e932e02fb8dcc201f010e0e16adfa76b143dd5a82c3829897acca7eab9b669c9d5541d5f96988ef2ee391f502938cadd6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hot-glue (0.4.8.1)
4
+ hot-glue (0.4.9.1)
5
5
  ffaker (~> 2.16)
6
6
  kaminari (~> 1.2)
7
7
  rails (> 5.1)
@@ -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 anly allowed access to themselves<% end %>
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
@@ -1,5 +1,5 @@
1
1
  module HotGlue
2
2
  class Version
3
- CURRENT = '0.4.9'
3
+ CURRENT = '0.4.9.1'
4
4
  end
5
5
  end
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-14 00:00:00.000000000 Z
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.6
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.