hot-glue 0.6.26 → 0.6.26.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: 0cfc8d749ec345dbcb5d02abf0c850e80a4c3265f02c259f719022a8125fdd12
4
- data.tar.gz: 02ec813fd1529fd21efacab451c9ce1f5c2eaa5704177ade118f9dff0f412449
3
+ metadata.gz: 077bb2e61017931d3db8f961922f3af0d4440bfd9900cc56f86bfa26aeb2e188
4
+ data.tar.gz: 3feecb2d560274cab61e7cb5f673175cf426fd6d7cef09112612e72f88e74038
5
5
  SHA512:
6
- metadata.gz: aa56cf2a1e0f84aec69426daab2c7e2d7dc2fcf3771ff2e797a387e3da37995f72f97074b11cc50a90f38ac16f15b10e211b63ef5f2f72f79d51b918456c2ad3
7
- data.tar.gz: b005066d967a6ed1377b4ecefcd62ca2223c0d20d36861fa1b4a03e04309e84c6675d9a07c00caf831b211fd12d0482d54414573fa6cb44c8a7de39aa2131911
6
+ metadata.gz: e2add6dcc569806f8953976332a63f29ea4cfa309ced3b8fdeb97b5c9108d030711d01a39fde8029bbfcacdde8fd7b0229861647258a40e340d1deeacfed13f8
7
+ data.tar.gz: 0c36945b6007e22bd672822bd206f842a1cd7eea54e819652fce71d613c66d8791b3902c51cb7c177f1c743a6e7a7241679b19e274e34e12bafe1dd06acbc187
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hot-glue (0.6.25)
4
+ hot-glue (0.6.26)
5
5
  ffaker (~> 2.16)
6
6
  kaminari (~> 1.2)
7
7
  rails (> 5.1)
data/README.md CHANGED
@@ -1620,20 +1620,20 @@ bin/rails generate hot_glue:set_search_interface_install
1620
1620
  ```
1621
1621
 
1622
1622
  _Additional search option for Set Search_
1623
- ##### `--search-fields=aaa,bbb,ccc,ddd,eee`
1623
+ ### `--search-fields=aaa,bbb,ccc,ddd,eee`
1624
1624
  to specify which fields you want to be searchable.
1625
1625
 
1626
1626
 
1627
- ##### `--search-query-fields=aaa,ddd`
1627
+ ### `--search-query-fields=aaa,ddd`
1628
1628
  to specify a list of strings only which will be taken out of the search set and presented in a singular query box (allowing search across multiple string fields)
1629
1629
 
1630
- ##### `--search-position=vertical`
1630
+ ### `--search-position=vertical`
1631
1631
  to specify vertical or horizontal (default: horizontal)
1632
1632
 
1633
- ##### `--search-clear-button` (no option)
1633
+ ### `--search-clear-button` (no option)
1634
1634
  to specify whether to show a clear button to clear the whole search form at once (default: false)
1635
1635
 
1636
- ##### `--search-autosearch` (no option)
1636
+ ### `--search-autosearch` (no option)
1637
1637
  to specify whether to automatically search when the user exit or changes any field (default: false)
1638
1638
 
1639
1639
  examples:
@@ -1657,8 +1657,7 @@ Here's how you would add a search interface to Example #1 in the [Hot Glue Tutor
1657
1657
  bin/rails generate Book --include=name,author_id --search=set --search-fields=name,author_id
1658
1658
  ```
1659
1659
 
1660
-
1661
- `--phantom-search='{type}_{name}[All|choice A:scope_a|choice B:scope_b],radio_yyyy[choice C:scope_c|]`
1660
+ ### `--phantom-search='{type}_{name}[All|choice A:scope_a|choice B:scope_b]`
1662
1661
 
1663
1662
  A phantom search is a search we are doing on this result set that doesn't correspond to a single field. Currently, the only available implementation is for scopes with no arguments, as in the example below. It is called 'phantom' because it could be (probably is) querying fields within the scope, but the search doesn't match up with a single field on your model. (So it's like creating 'phantom' criteria.). Only RADIO type is implemented, dropdown & checkboxes an a way to input a search value passed into the scope as an argument is TBD.
1664
1663
 
@@ -1666,13 +1665,24 @@ A phantom search is a search we are doing on this result set that doesn't corres
1666
1665
 
1667
1666
  {name} is a designation for this phantom search. Should NOT match any field name on your table. This should describe the kind of categorization we are performing.
1668
1667
 
1669
-
1670
1668
  Your phantom search selector will be appended to the search fields and will be treated like a first-class search input, able to be combined with any of the other fields specified in a set search.
1671
1669
 
1672
- After the type & name, comes a block marked by square braces [ ... ] . Within the square braces, each search option is separated by a pipe (|) character. Within each option is a label & ruby scope, separated by a colon (:). The label comes before the colon the ruby scope. The scope should be specified here without a dot should be defined on your model. If there is scope specified, we assume "all", but we still need to specify a label for "All", which is why in the example above "All" has no colon after it.
1670
+ Note that multiple phantom searched can be specified by separating them by comma (`,`), like so:
1671
+
1672
+ `--phantom-search='radio_xxxx[All|choice A:scope_a|choice B:scope_b],radio_yyyy[All|choice W:scope_w|choice Z:scope_z|]`
1673
+ (this creates two phantom searches: `xxxx` and `yyyy` both radio selection lists)
1674
+
1675
+ After the type & name, comes a block marked by square braces [ ... ]
1676
+
1677
+ Within the square braces, each search option is separated by a pipe (|) character.
1673
1678
 
1679
+ Within each option is a label and ruby scope, separated by a colon (:).
1674
1680
 
1675
- ### `--phantom-search='radio_status[Pending:pending|Rejected:rejected|Accepted:accepted]|All'`
1681
+ The label comes before the colon the ruby scope. The ruby scope should be specified here without a dot. Each ruby scope must be defined on your model. If there is no scope specified, we assume "all", but we still need to specify a label for "All", which is why in the example above "All" has no colon after it.
1682
+
1683
+ example
1684
+
1685
+ `--phantom-search='radio_status[Pending:pending|Rejected:rejected|Accepted:accepted|All]'`
1676
1686
 
1677
1687
  On my model, I have these scopes defined:
1678
1688
 
@@ -1682,7 +1692,6 @@ scope :rejected, -> { where.not(rejected_at: nil) }
1682
1692
  scope :not_rejected, -> { where(rejected_at: nil) }
1683
1693
  scope :not_approved, -> { where(approved_at: nil) }
1684
1694
 
1685
-
1686
1695
  This produces a search interface with four options listed as radio buttons:
1687
1696
  ° Pending
1688
1697
  ° Approved
@@ -1693,13 +1702,11 @@ This produces a search interface with four options listed as radio buttons:
1693
1702
 
1694
1703
  The pending, approved, and rejected options will return search results with the corresponding scopes applied. The 'All' option will behave as a no-op, leaving the root search intact (giving all of the other modifications that Hot glue provides in different functionality).
1695
1704
 
1696
-
1697
1705
  #### Predicate Search
1698
1706
  NOT IMPLEMENTED YET
1699
1707
  TODO: implement me
1700
1708
 
1701
1709
 
1702
-
1703
1710
  ### `--stimmify` or `--stimmify=xyz`
1704
1711
 
1705
1712
  Automatically build the new and edit form with `data-controller='xyz'` to attach stimulus
@@ -1835,6 +1835,7 @@ class HotGlue::ScaffoldGenerator < Erb::Generators::ScaffoldGenerator
1835
1835
  res << "\n @#{plural} = @#{plural}#{choice[:scope]} if @q['0'][:#{phantom_key}_search] == \"#{choice[:label]}\""
1836
1836
  end
1837
1837
  end
1838
+ res << "\n"
1838
1839
  end
1839
1840
 
1840
1841
  res << " @#{plural} = @#{plural}.page(params[:page])#{ ".per(per)" if @paginate_per_page_selector }"
@@ -1,5 +1,5 @@
1
1
  module HotGlue
2
2
  class Version
3
- CURRENT = '0.6.26'
3
+ CURRENT = '0.6.26.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hot-glue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.26
4
+ version: 0.6.26.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Fleetwood-Boldt