ransack 2.6.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/.nojekyll +0 -0
  3. data/CHANGELOG.md +75 -13
  4. data/README.md +45 -1039
  5. data/docs/.gitignore +20 -0
  6. data/docs/.nojekyll +0 -0
  7. data/docs/babel.config.js +3 -0
  8. data/docs/blog/2022-03-27-ransack-3.0.0.md +20 -0
  9. data/docs/docs/getting-started/_category_.json +4 -0
  10. data/docs/docs/getting-started/advanced-mode.md +46 -0
  11. data/docs/docs/getting-started/configuration.md +47 -0
  12. data/docs/docs/getting-started/search-matches.md +67 -0
  13. data/docs/docs/getting-started/simple-mode.md +284 -0
  14. data/docs/docs/getting-started/sorting.md +79 -0
  15. data/docs/docs/getting-started/using-predicates.md +282 -0
  16. data/docs/docs/going-further/_category_.json +4 -0
  17. data/docs/docs/going-further/associations.md +70 -0
  18. data/docs/docs/going-further/custom-predicates.md +52 -0
  19. data/docs/docs/going-further/documentation.md +31 -0
  20. data/docs/docs/going-further/exporting-to-csv.md +49 -0
  21. data/docs/docs/going-further/external-guides.md +57 -0
  22. data/docs/docs/going-further/form-customisation.md +63 -0
  23. data/docs/docs/going-further/i18n.md +53 -0
  24. data/docs/{img → docs/going-further/img}/create_release.png +0 -0
  25. data/docs/docs/going-further/merging-searches.md +41 -0
  26. data/docs/docs/going-further/other-notes.md +428 -0
  27. data/docs/docs/going-further/ransackers.md +331 -0
  28. data/docs/docs/going-further/release_process.md +36 -0
  29. data/docs/docs/going-further/saving-queries.md +82 -0
  30. data/docs/docs/going-further/searching-postgres.md +57 -0
  31. data/docs/docs/intro.md +99 -0
  32. data/docs/docusaurus.config.js +108 -0
  33. data/docs/package-lock.json +9207 -0
  34. data/docs/package.json +37 -0
  35. data/docs/sidebars.js +31 -0
  36. data/docs/src/components/HomepageFeatures/index.js +64 -0
  37. data/docs/src/components/HomepageFeatures/styles.module.css +11 -0
  38. data/docs/src/css/custom.css +39 -0
  39. data/docs/src/pages/index.module.css +23 -0
  40. data/docs/src/pages/markdown-page.md +7 -0
  41. data/docs/static/.nojekyll +0 -0
  42. data/docs/static/img/docusaurus.png +0 -0
  43. data/docs/static/img/favicon.ico +0 -0
  44. data/docs/static/img/logo.svg +1 -0
  45. data/docs/static/img/tutorial/docsVersionDropdown.png +0 -0
  46. data/docs/static/img/tutorial/localeDropdown.png +0 -0
  47. data/docs/static/img/undraw_docusaurus_mountain.svg +171 -0
  48. data/docs/static/img/undraw_docusaurus_react.svg +170 -0
  49. data/docs/static/img/undraw_docusaurus_tree.svg +40 -0
  50. data/{logo → docs/static/logo}/ransack-h.png +0 -0
  51. data/{logo → docs/static/logo}/ransack-h.svg +0 -0
  52. data/{logo → docs/static/logo}/ransack-v.png +0 -0
  53. data/{logo → docs/static/logo}/ransack-v.svg +0 -0
  54. data/{logo → docs/static/logo}/ransack.png +0 -0
  55. data/{logo → docs/static/logo}/ransack.svg +0 -0
  56. data/docs/yarn.lock +7671 -0
  57. data/lib/ransack/adapters/active_record/base.rb +0 -2
  58. data/lib/ransack/adapters/active_record/context.rb +1 -0
  59. data/lib/ransack/helpers/form_helper.rb +10 -2
  60. data/lib/ransack/search.rb +2 -2
  61. data/lib/ransack/version.rb +1 -1
  62. data/ransack.gemspec +2 -2
  63. data/spec/ransack/adapters/active_record/base_spec.rb +10 -1
  64. data/spec/ransack/helpers/form_helper_spec.rb +32 -0
  65. data/spec/ransack/search_spec.rb +23 -0
  66. data/spec/support/schema.rb +16 -0
  67. metadata +58 -12
  68. data/docs/release_process.md +0 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 613abc9bb025f01243aa427878dec0cb7e990e3a9deb3e1436b7f0f3b124bf44
4
- data.tar.gz: 1466899c236bc6c9d1e95fc5262b5b3d6cde18f51929273168ff3286ead4be34
3
+ metadata.gz: 400fa6bc00b27207224ee94101cd526a602076669e1824c605e9897d3fd6ba7c
4
+ data.tar.gz: df6443d69d67e1a59ab97378784c8ddbb3966d3dd6376e3362bacae0afea72c6
5
5
  SHA512:
6
- metadata.gz: 2d8f6c96d9b0d4af4d5d64c3aa24cbe79abefe78388ff35637577a46b99b99decf25e51433368634ae557a72707470a9291c62ca33cae15b7ce0edb51b682712
7
- data.tar.gz: 66bcf53be5d9f201f0e51db95140a56b29e3d61c0b9d79fbd3238e3e67a2b0bb5463dc08ebf445155d502f1b8bfb87b0be38040521219733a852471f32385e0b
6
+ metadata.gz: e620b446afd597cfa16e20be2f20d762791d496cd24ec3441f8553697b81a0ac50280da1ec07a068962f06937cfb7fdbaeeab33dd17fbdb0233226cd42f95d6a
7
+ data.tar.gz: 30b74e2d17fbb7e215ff60a129f1bf4af779e0b1d6d62865e1d8dfb8b9215d6a06f0008f1704e6fb25ab83e25dafa0f2fa219c57588eafe5260b14a0f9c5f0f0
data/.nojekyll ADDED
File without changes
data/CHANGELOG.md CHANGED
@@ -2,6 +2,41 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 3.0.0 - 2022-03-30
6
+
7
+ * Move documentation into Docusaurus.
8
+ PR [1291](https://github.com/activerecord-hackery/ransack/pull/1291)
9
+
10
+ * [BREAKING CHANGE] Remove deprecated `#search` method.
11
+ PR [1147](https://github.com/activerecord-hackery/ransack/pull/1147)
12
+
13
+ * Allow scopes that define string SQL joins.
14
+ PR [1225](https://github.com/activerecord-hackery/ransack/pull/1225)
15
+
16
+ * Improve `sort_link` documentation.
17
+ PR [1290](https://github.com/activerecord-hackery/ransack/pull/1290)
18
+
19
+ * Deprecate passing two trailing hashes to `sort_link`, for example:
20
+
21
+ ```ruby
22
+ sort_link(@q, :bussiness_name, "bussines_name", {}, class: "foo")
23
+ ```
24
+
25
+ Pass a single hash with all options instead.
26
+ PR [1289](https://github.com/activerecord-hackery/ransack/pull/1289)
27
+
28
+ * Fix `:class` option to `sort_link` not being passed to the generated link
29
+ correctly when no additional options are passed. For example:
30
+
31
+ ```ruby
32
+ sort_link(@q, :bussiness_name, class: "foo")
33
+ ```
34
+
35
+ PR [1288](https://github.com/activerecord-hackery/ransack/pull/1288)
36
+
37
+ * Evaluate `ransackable_scopes` before attributes when building the query.
38
+ PR [759](https://github.com/activerecord-hackery/ransack/pull/759)
39
+
5
40
  ## 2.6.0 - 2022-03-08
6
41
 
7
42
  * Fix regression when joining a table with itself.
@@ -12,28 +47,55 @@
12
47
 
13
48
  ## 2.5.0 - 2021-12-26
14
49
 
50
+ * Document release process by @scarroll32 in https://github.com/activerecord-hackery/ransack/pull/1199, https://github.com/activerecord-hackery/ransack/pull/1200.
51
+ * Support Rails 7 by @yahonda in https://github.com/activerecord-hackery/ransack/pull/1205, https://github.com/activerecord-hackery/ransack/pull/1209, https://github.com/activerecord-hackery/ransack/pull/1234, https://github.com/activerecord-hackery/ransack/pull/1230, https://github.com/activerecord-hackery/ransack/pull/1266
52
+ * Fix for `ActiveRecord::UnknownAttributeReference` in ransack by @TechnologyHypofriend in https://github.com/activerecord-hackery/ransack/pull/1207
53
+ * Make gem compatible with old polyamorous require by @rtweeks in https://github.com/activerecord-hackery/ransack/pull/1145
54
+ * Adding swedish translations by @johanandre in https://github.com/activerecord-hackery/ransack/pull/1208
55
+ * Document how to do case insensitive searches by @scarroll32 in https://github.com/activerecord-hackery/ransack/pull/1213
56
+ * Add the ability to disable whitespace stripping for string searches by @DCrow in https://github.com/activerecord-hackery/ransack/pull/1214
57
+ * Fix `:default` option in `Translate.attribute` method by @coreyaus in https://github.com/activerecord-hackery/ransack/pull/1218
58
+ * Fix typo in README.md by @d-m-u in https://github.com/activerecord-hackery/ransack/pull/1220
59
+ * Fix another typo in README.md by @plan-do-break-fix in https://github.com/activerecord-hackery/ransack/pull/1221
60
+ * Fix several documentation typos @wonda-tea-coffee in https://github.com/activerecord-hackery/ransack/pull/1233
61
+ * Allow ransack to treat nulls as always first or last by @mollerhoj in https://github.com/activerecord-hackery/ransack/pull/1226
62
+ * Consider ransack aliases when sorting by @faragorn and @waldyr in https://github.com/activerecord-hackery/ransack/pull/1223
63
+ * Fix non-casted array predicates by @danielpclark in https://github.com/activerecord-hackery/ransack/pull/1246
64
+ * Remove Squeel references from README by @Schwad in https://github.com/activerecord-hackery/ransack/pull/1249
65
+ * Remove part of the README that might lead to incorrect results by @RadekMolenda in https://github.com/activerecord-hackery/ransack/pull/1258
15
66
  * ActiveRecord 7.0 support
16
67
 
17
- * Drop support for rubies under 2.5. PR #1189
68
+ ## 2.4.2 - 2021-01-23
18
69
 
19
- * Have casted array predicates type checked to Arel::Nodes::Casted fixing non-casted array predicates.
20
- PR [1246](https://github.com/activerecord-hackery/ransack/pull/1246)
70
+ * Enable RuboCop and configure GitHub Actions to run RuboCop by @yahonda in https://github.com/activerecord-hackery/ransack/pull/1185
71
+ * Add Ruby 3.0.0 support by @yahonda in https://github.com/activerecord-hackery/ransack/pull/1190
72
+ * Drop Ruby 2.5 or older versions of Ruby by @yahonda in https://github.com/activerecord-hackery/ransack/pull/1189
73
+ * Move bug report templates into ransack repository and run templates at CI by @yahonda in https://github.com/activerecord-hackery/ransack/pull/1191
74
+ * Allow Ransack to be tested with Rails main branch by @yahonda in https://github.com/activerecord-hackery/ransack/pull/1192
21
75
 
22
76
  ## 2.4.1 - 2020-12-21
23
77
 
24
- * Add `ActiveRecord::Base.ransack!` which raises error if passed unknown condition
25
-
26
- *Aaron Lipman*
78
+ * Links to Tidelift subscription by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1178
79
+ * Enable GitHub Actions by @yahonda in https://github.com/activerecord-hackery/ransack/pull/1180
80
+ * Move security contact information to SECURITY.md by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1179
81
+ * Add `ActiveRecord::Base.ransack!` which raises error if passed unknown condition by @alipman88 in https://github.com/activerecord-hackery/ransack/pull/1132
82
+ * Add ability to config PostgreSQL ORDER BY ... NULLS FIRST or NULLS LAST by @itsalongstory in https://github.com/activerecord-hackery/ransack/pull/1184
27
83
 
28
84
  ## 2.4.0 - 2020-11-27
29
85
 
30
- * Support ActiveRecord 6.1.0.rc1.
31
- PR [1172](https://github.com/activerecord-hackery/ransack/pull/1172)
32
-
33
- * Fix for ActiveRecord 5.2.4 (note security fix in 5.2.4.2 for ActiveView's escape_javascript CVE-2020-5267 for all earlier versions)
34
-
35
- * Drop support for ActiveRecord older than 5.2.4.
36
- PR [1166](https://github.com/activerecord-hackery/ransack/pull/1166)
86
+ * Specify actual version of polyamorous, so we can release that separately by @gregmolnar in https://github.com/activerecord-hackery/ransack/pull/1101
87
+ * Only include necessary files in gem package by @tvdeyen in https://github.com/activerecord-hackery/ransack/pull/1104
88
+ * Test/Fix for subquery in Rails 5.2.4 by @stevenjonescgm in https://github.com/activerecord-hackery/ransack/pull/1112
89
+ * Polyamorous module by @varyonic in https://github.com/activerecord-hackery/ransack/pull/1113
90
+ * Remove duplicated rows by @sasharevzin in https://github.com/activerecord-hackery/ransack/pull/1116
91
+ * Fix Ruby 2.7 deprecation warnings by @terracatta in https://github.com/activerecord-hackery/ransack/pull/1121
92
+ * Fixes polymorphic joins. by @PhilCoggins in https://github.com/activerecord-hackery/ransack/pull/1122
93
+ * Drop support for activerecord older than 5.2.4 by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1166
94
+ * Adapt to quoting change in Rails by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1165
95
+ * Typo in docs by @brett-anderson in https://github.com/activerecord-hackery/ransack/pull/1155
96
+ * Add Rails 6.1 support by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1172
97
+ * Strip Leading & Trailing Whitespace Before Searching by @itsalongstory in https://github.com/activerecord-hackery/ransack/pull/1126
98
+ * Use unfrozen version of symbol to string by @fauno in https://github.com/activerecord-hackery/ransack/pull/1149
37
99
 
38
100
  ## 2.3.2 - 2020-01-11
39
101