hot-glue 0.6.24 → 0.6.25

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: b6f0b7db93d319807a09627a2272bbe451b7de1d6c18a2599a26ebf95183b6cd
4
- data.tar.gz: 8ab6b66aba18ac70f1cbb98dbce90fe92a9c7bf81700e292566c9426504695c4
3
+ metadata.gz: 484a64a521f4d21dbb5b437ce26950d218e5a7ea5917261eb0fbb59119bc19d5
4
+ data.tar.gz: 8d4570fcf5fc850c1bee98868fa19bd2805f794fa6a94425876c2bc9d4bc94af
5
5
  SHA512:
6
- metadata.gz: 194e75f4fff99b371bdd8b0a6130c7bc158ebab17f2daf530e09afaf7844ddb5b40df63c2d51fcd483430beea65c78013eaaa15176f3113d4588c8b069e7fb25
7
- data.tar.gz: f1f665a844f0fd0a33077d2780b215538247d8a4241dcf9dad93a586a545d3a047722e442501a9f7389475db80271a5a7d69a579e58f00075fe4466e609994b3
6
+ metadata.gz: 49bc8ddab30ed9cb637dbbe9da496fd47836239c9f260a61b03b81ef23ef3dab864aba2c84a634dad6004720cb6a9697afed9cbbdcb2ff3de76324bc42ab760e
7
+ data.tar.gz: 3145730b0c6510dcf6d813ff59acca04b867c248fb4f8107cae496c6a9405cf29260c6a8bde3e644aadf4e9853275fc55ba741409ef30014ac48fdd6fc12c2ef
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hot-glue (0.6.24)
4
+ hot-glue (0.6.25)
5
5
  ffaker (~> 2.16)
6
6
  kaminari (~> 1.2)
7
7
  rails (> 5.1)
data/README.md CHANGED
@@ -2042,6 +2042,11 @@ has_many :users, through: :account_users
2042
2042
  ```
2043
2043
 
2044
2044
 
2045
+ Notice that from the table of things referencing the typeahead thing,
2046
+ the `--modify` takes a 3rd parameter in `[...]` to specify the nested set if the typeahead itself is nested.
2047
+
2048
+ As with this example, this means that the object referencing the typeahead object must be in the same namespace, but does not need to be at the same nest level.
2049
+
2045
2050
  `bin/rails generate hot_glue:scaffold Member --auth='current_user' --auth-identifier='user' --auth-identifier=user --modify='user_id{typeahead}[account]'`
2046
2051
 
2047
2052
  in our routes.rb file, we have
@@ -100,6 +100,7 @@ class AssociationField < Field
100
100
  parts = name.split('_')
101
101
  "<%= f.text_field :__lookup_#{assoc}_#{lookup_field}, value: @#{singular}.#{assoc_name}&.#{lookup_field}, placeholder: \"#{lookup_field}\" " + (stimmify ? ", 'data-#{@stimmify}-target': '#{camelcase_name}' " : "") + "%>"
102
102
  elsif modify_as && modify_as[:typeahead]
103
+
103
104
  search_url = "#{namespace ? namespace + "_" : ""}" +
104
105
  modify_as[:nested].join("_") + ( modify_as[:nested].any? ? "_" : "") +
105
106
  + "#{assoc.class_name.downcase.pluralize}_typeahead_index_url"
@@ -14,7 +14,7 @@ class <%= ((@namespace.titleize.gsub(" ", "") + "::" if @namespace) || "") + @pl
14
14
  <% nest_chain = [] %>
15
15
  <% @nested_set.each { |arg|
16
16
  if @auth_identifier == arg[:singular]
17
- this_scope = auth_object
17
+ this_scope = auth_object
18
18
  elsif nest_chain.empty?
19
19
  this_scope = "#{@auth ? @auth : class_name}.#{arg[:plural]}"
20
20
  else
@@ -103,6 +103,10 @@ module HotGlue
103
103
  end
104
104
 
105
105
 
106
+ def auth_object
107
+ "#{@auth}_id"
108
+ end
109
+
106
110
  def namespace_with_dash
107
111
  if @namespace
108
112
  "/#{@namespace}"
@@ -1,5 +1,5 @@
1
1
  module HotGlue
2
2
  class Version
3
- CURRENT = '0.6.24'
3
+ CURRENT = '0.6.25'
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.6.24
4
+ version: 0.6.25
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: 2025-08-22 00:00:00.000000000 Z
11
+ date: 2025-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails