ransack 2.4.2 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/codeql.yml +72 -0
  3. data/.github/workflows/cronjob.yml +6 -9
  4. data/.github/workflows/deploy.yml +35 -0
  5. data/.github/workflows/rubocop.yml +1 -1
  6. data/.github/workflows/test-deploy.yml +29 -0
  7. data/.github/workflows/test.yml +22 -48
  8. data/.nojekyll +0 -0
  9. data/.rubocop.yml +3 -0
  10. data/CHANGELOG.md +208 -11
  11. data/CONTRIBUTING.md +41 -18
  12. data/Gemfile +10 -10
  13. data/README.md +44 -977
  14. data/bug_report_templates/test-ransacker-arel-present-predicate.rb +4 -0
  15. data/docs/.gitignore +19 -0
  16. data/docs/.nojekyll +0 -0
  17. data/docs/babel.config.js +3 -0
  18. data/docs/blog/2022-03-27-ransack-3.0.0.md +20 -0
  19. data/docs/docs/getting-started/_category_.json +4 -0
  20. data/docs/docs/getting-started/advanced-mode.md +46 -0
  21. data/docs/docs/getting-started/configuration.md +47 -0
  22. data/docs/docs/getting-started/search-matches.md +67 -0
  23. data/docs/docs/getting-started/simple-mode.md +288 -0
  24. data/docs/docs/getting-started/sorting.md +79 -0
  25. data/docs/docs/getting-started/using-predicates.md +282 -0
  26. data/docs/docs/going-further/_category_.json +4 -0
  27. data/docs/docs/going-further/acts-as-taggable-on.md +114 -0
  28. data/docs/docs/going-further/associations.md +70 -0
  29. data/docs/docs/going-further/custom-predicates.md +52 -0
  30. data/docs/docs/going-further/documentation.md +43 -0
  31. data/docs/docs/going-further/exporting-to-csv.md +49 -0
  32. data/docs/docs/going-further/external-guides.md +57 -0
  33. data/docs/docs/going-further/form-customisation.md +63 -0
  34. data/docs/docs/going-further/i18n.md +53 -0
  35. data/docs/docs/going-further/merging-searches.md +41 -0
  36. data/docs/docs/going-further/other-notes.md +428 -0
  37. data/docs/docs/going-further/polymorphic-search.md +40 -0
  38. data/docs/docs/going-further/ransackers.md +331 -0
  39. data/docs/docs/going-further/release_process.md +36 -0
  40. data/docs/docs/going-further/saving-queries.md +82 -0
  41. data/docs/docs/going-further/searching-postgres.md +57 -0
  42. data/docs/docs/going-further/wiki-contributors.md +82 -0
  43. data/docs/docs/intro.md +99 -0
  44. data/docs/docusaurus.config.js +120 -0
  45. data/docs/package.json +42 -0
  46. data/docs/sidebars.js +31 -0
  47. data/docs/src/components/HomepageFeatures/index.js +64 -0
  48. data/docs/src/components/HomepageFeatures/styles.module.css +11 -0
  49. data/docs/src/css/custom.css +39 -0
  50. data/docs/src/pages/index.module.css +23 -0
  51. data/docs/src/pages/markdown-page.md +7 -0
  52. data/docs/static/.nojekyll +0 -0
  53. data/docs/static/img/docusaurus.png +0 -0
  54. data/docs/static/img/favicon.ico +0 -0
  55. data/docs/static/img/logo.svg +1 -0
  56. data/docs/static/img/tutorial/docsVersionDropdown.png +0 -0
  57. data/docs/static/img/tutorial/localeDropdown.png +0 -0
  58. data/docs/static/img/undraw_docusaurus_mountain.svg +171 -0
  59. data/docs/static/img/undraw_docusaurus_react.svg +170 -0
  60. data/docs/static/img/undraw_docusaurus_tree.svg +40 -0
  61. data/docs/yarn.lock +8790 -0
  62. data/lib/polyamorous/activerecord_6.1_ruby_2/join_association.rb +0 -4
  63. data/lib/polyamorous/activerecord_6.1_ruby_2/join_dependency.rb +0 -1
  64. data/lib/polyamorous/activerecord_6.1_ruby_2/reflection.rb +11 -1
  65. data/lib/polyamorous/activerecord_7.1_ruby_2/join_association.rb +1 -0
  66. data/lib/polyamorous/activerecord_7.1_ruby_2/join_dependency.rb +1 -0
  67. data/lib/polyamorous/activerecord_7.1_ruby_2/reflection.rb +1 -0
  68. data/lib/ransack/adapters/active_record/base.rb +79 -10
  69. data/lib/ransack/adapters/active_record/context.rb +24 -51
  70. data/lib/ransack/configuration.rb +39 -12
  71. data/lib/ransack/constants.rb +125 -3
  72. data/lib/ransack/context.rb +34 -5
  73. data/lib/ransack/helpers/form_builder.rb +3 -3
  74. data/lib/ransack/helpers/form_helper.rb +14 -5
  75. data/lib/ransack/locale/sv.yml +70 -0
  76. data/lib/ransack/nodes/attribute.rb +2 -2
  77. data/lib/ransack/nodes/condition.rb +80 -7
  78. data/lib/ransack/nodes/grouping.rb +3 -3
  79. data/lib/ransack/nodes/node.rb +1 -1
  80. data/lib/ransack/nodes/sort.rb +2 -2
  81. data/lib/ransack/nodes/value.rb +2 -2
  82. data/lib/ransack/predicate.rb +1 -1
  83. data/lib/ransack/ransacker.rb +1 -1
  84. data/lib/ransack/search.rb +13 -7
  85. data/lib/ransack/translate.rb +3 -3
  86. data/lib/ransack/version.rb +1 -1
  87. data/lib/ransack/visitor.rb +38 -2
  88. data/lib/ransack.rb +3 -6
  89. data/ransack.gemspec +5 -5
  90. data/spec/helpers/polyamorous_helper.rb +2 -8
  91. data/spec/polyamorous/activerecord_compatibility_spec.rb +15 -0
  92. data/spec/polyamorous/join_association_spec.rb +1 -6
  93. data/spec/polyamorous/join_dependency_spec.rb +0 -16
  94. data/spec/ransack/adapters/active_record/base_spec.rb +101 -11
  95. data/spec/ransack/configuration_spec.rb +23 -9
  96. data/spec/ransack/helpers/form_builder_spec.rb +8 -8
  97. data/spec/ransack/helpers/form_helper_spec.rb +93 -4
  98. data/spec/ransack/nodes/condition_spec.rb +37 -0
  99. data/spec/ransack/nodes/value_spec.rb +115 -0
  100. data/spec/ransack/predicate_spec.rb +36 -1
  101. data/spec/ransack/search_spec.rb +140 -27
  102. data/spec/ransack/translate_spec.rb +1 -1
  103. data/spec/support/schema.rb +75 -9
  104. metadata +83 -37
  105. data/docs/release_process.md +0 -20
  106. data/lib/polyamorous/activerecord_5.2_ruby_2/join_association.rb +0 -24
  107. data/lib/polyamorous/activerecord_5.2_ruby_2/join_dependency.rb +0 -79
  108. data/lib/polyamorous/activerecord_5.2_ruby_2/reflection.rb +0 -11
  109. data/lib/polyamorous/activerecord_6.0_ruby_2/join_association.rb +0 -1
  110. data/lib/polyamorous/activerecord_6.0_ruby_2/join_dependency.rb +0 -80
  111. data/lib/polyamorous/activerecord_6.0_ruby_2/reflection.rb +0 -1
  112. data/lib/ransack/adapters/active_record/ransack/constants.rb +0 -128
  113. data/lib/ransack/adapters/active_record/ransack/context.rb +0 -56
  114. data/lib/ransack/adapters/active_record/ransack/nodes/condition.rb +0 -68
  115. data/lib/ransack/adapters/active_record/ransack/translate.rb +0 -8
  116. data/lib/ransack/adapters/active_record/ransack/visitor.rb +0 -47
  117. data/lib/ransack/adapters.rb +0 -64
  118. data/lib/ransack/nodes.rb +0 -8
  119. /data/docs/{img → docs/going-further/img}/create_release.png +0 -0
  120. /data/{logo → docs/static/logo}/ransack-h.png +0 -0
  121. /data/{logo → docs/static/logo}/ransack-h.svg +0 -0
  122. /data/{logo → docs/static/logo}/ransack-v.png +0 -0
  123. /data/{logo → docs/static/logo}/ransack-v.svg +0 -0
  124. /data/{logo → docs/static/logo}/ransack.png +0 -0
  125. /data/{logo → docs/static/logo}/ransack.svg +0 -0
  126. /data/lib/polyamorous/{activerecord_6.2_ruby_2 → activerecord_7.0_ruby_2}/join_association.rb +0 -0
  127. /data/lib/polyamorous/{activerecord_6.2_ruby_2 → activerecord_7.0_ruby_2}/join_dependency.rb +0 -0
  128. /data/lib/polyamorous/{activerecord_6.2_ruby_2 → activerecord_7.0_ruby_2}/reflection.rb +0 -0
  129. /data/lib/ransack/{adapters/active_record.rb → active_record.rb} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7e53f2a86ba264e751c3311254c7cb4b25efdb0c876310835b6f6221ab24928
4
- data.tar.gz: 161ca5255a24fa42c63d6afbbf38e518581189db773e7e43940b31b1b8d86850
3
+ metadata.gz: 39e79c778f9eacf124a0ae2465c586d016b8fc6dd934b889d9e7ac9ede798ea7
4
+ data.tar.gz: 45c34ad5656bd01fd03e9240cf60f7419c662ad0b9aba3a1340ae701844612db
5
5
  SHA512:
6
- metadata.gz: 17c4701dbf3523dfa16feae0dd0dddc8bd077237d7e695eb69664f1b9c5ab5e2fea4a59b5878fe8e607b135ea834f12284f03c42a9ce2971f2f9c9b65d347205
7
- data.tar.gz: 4c9d09980609ffc43bc505a947781b9fcdc97efb7897c3bbc3278d8391ab219e4fdffd8a813272a3af7403eefc162fddb6f9f379b713894d3951ff2fc7a141f3
6
+ metadata.gz: 7f8b2e4b1f4adaa8d1871879364d836c8a59fbc1b7342857a4d18c7406dd074d2b000380960e1b56555548968c866a109f7600090dc93cc533bc12b7cc52b6aa
7
+ data.tar.gz: 6b7c84bccd3ba55de586bb2ff58c5a95da5062e4c2046d00065289260af32a5b1991b21d7acad28f7d1e20cb75cde526126f7bef7f0296fead10395b95849af0
@@ -0,0 +1,72 @@
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL"
13
+
14
+ on:
15
+ push:
16
+ branches: [ main ]
17
+ pull_request:
18
+ # The branches below must be a subset of the branches above
19
+ branches: [ main ]
20
+ schedule:
21
+ - cron: '43 11 * * 3'
22
+
23
+ jobs:
24
+ analyze:
25
+ name: Analyze
26
+ runs-on: ubuntu-latest
27
+ permissions:
28
+ actions: read
29
+ contents: read
30
+ security-events: write
31
+
32
+ strategy:
33
+ fail-fast: false
34
+ matrix:
35
+ language: [ 'ruby' ]
36
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37
+ # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
38
+
39
+ steps:
40
+ - name: Checkout repository
41
+ uses: actions/checkout@v3
42
+
43
+ # Initializes the CodeQL tools for scanning.
44
+ - name: Initialize CodeQL
45
+ uses: github/codeql-action/init@v2
46
+ with:
47
+ languages: ${{ matrix.language }}
48
+ # If you wish to specify custom queries, you can do so here or in a config file.
49
+ # By default, queries listed here will override any specified in a config file.
50
+ # Prefix the list here with "+" to use these queries and those in the config file.
51
+
52
+ # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
53
+ # queries: security-extended,security-and-quality
54
+
55
+
56
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
57
+ # If this step fails, then you should remove it and run the build manually (see below)
58
+ - name: Autobuild
59
+ uses: github/codeql-action/autobuild@v2
60
+
61
+ # ℹ️ Command-line programs to run using the OS shell.
62
+ # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
63
+
64
+ # If the Autobuild fails above, remove it and uncomment the following three lines.
65
+ # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
66
+
67
+ # - run: |
68
+ # echo "Run, Build Application using script"
69
+ # ./location_of_script_within_repo/buildscript.sh
70
+
71
+ - name: Perform CodeQL Analysis
72
+ uses: github/codeql-action/analyze@v2
@@ -11,9 +11,8 @@ jobs:
11
11
  fail-fast: false
12
12
  matrix:
13
13
  ruby:
14
- - 3.0.0
15
- - 2.7.2
16
- - 2.6.6
14
+ - 3.0.2
15
+ - 2.7.4
17
16
  env:
18
17
  DB: sqlite3
19
18
  RAILS: main
@@ -34,9 +33,8 @@ jobs:
34
33
  fail-fast: false
35
34
  matrix:
36
35
  ruby:
37
- - 3.0.0
38
- - 2.7.2
39
- - 2.6.6
36
+ - 3.0.2
37
+ - 2.7.4
40
38
  env:
41
39
  DB: mysql
42
40
  RAILS: main
@@ -66,9 +64,8 @@ jobs:
66
64
  fail-fast: false
67
65
  matrix:
68
66
  ruby:
69
- - 3.0.0
70
- - 2.7.2
71
- - 2.6.6
67
+ - 3.0.2
68
+ - 2.7.4
72
69
  env:
73
70
  DB: postgres
74
71
  RAILS: main
@@ -0,0 +1,35 @@
1
+ name: Deploy to GitHub Pages
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ deploy:
10
+ name: Deploy to GitHub Pages
11
+
12
+ runs-on: ubuntu-20.04
13
+
14
+ steps:
15
+ - uses: actions/checkout@v3
16
+
17
+ - uses: actions/setup-node@v3
18
+ with:
19
+ node-version: 16
20
+ cache: yarn
21
+ cache-dependency-path: docs/yarn.lock
22
+
23
+ - name: Install dependencies
24
+ run: yarn install --frozen-lockfile
25
+ working-directory: docs
26
+
27
+ - name: Build website
28
+ run: yarn build
29
+ working-directory: docs
30
+
31
+ - name: Deploy to GitHub Pages
32
+ uses: peaceiris/actions-gh-pages@v3
33
+ with:
34
+ github_token: ${{ secrets.GITHUB_TOKEN }}
35
+ publish_dir: docs/build
@@ -13,7 +13,7 @@ jobs:
13
13
  - name: Set up Ruby
14
14
  uses: ruby/setup-ruby@v1
15
15
  with:
16
- ruby-version: 3.0.0
16
+ ruby-version: 3.0.1
17
17
  - name: Install gems
18
18
  run: bundle install --jobs 4 --retry 3
19
19
  - name: Run RuboCop
@@ -0,0 +1,29 @@
1
+ name: Test deploy to GitHub Pages
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ test-deploy:
10
+ name: Test deploy to GitHub Pages
11
+
12
+ runs-on: ubuntu-20.04
13
+
14
+ steps:
15
+ - uses: actions/checkout@v3
16
+
17
+ - uses: actions/setup-node@v3
18
+ with:
19
+ node-version: 16
20
+ cache: yarn
21
+ cache-dependency-path: docs/yarn.lock
22
+
23
+ - name: Install dependencies
24
+ run: yarn install --frozen-lockfile
25
+ working-directory: docs
26
+
27
+ - name: Test build website
28
+ run: yarn build
29
+ working-directory: docs
@@ -2,6 +2,8 @@ name: test
2
2
 
3
3
  on:
4
4
  push:
5
+ branches:
6
+ - main
5
7
  pull_request:
6
8
 
7
9
  jobs:
@@ -11,20 +13,12 @@ jobs:
11
13
  fail-fast: false
12
14
  matrix:
13
15
  rails:
14
- - v6.1.1
15
- - v6.0.3
16
- - 6-0-stable
17
- - 5-2-stable
18
- - v5.2.4
16
+ - v7.0.3
17
+ - v6.1.6
19
18
  ruby:
20
- - 3.0.0
21
- - 2.7.2
22
- - 2.6.6
23
- exclude:
24
- - rails: v5.2.4
25
- ruby: 3.0.0
26
- - rails: 5-2-stable
27
- ruby: 3.0.0
19
+ - 3.1.2
20
+ - 3.0.4
21
+ - 2.7.6
28
22
  env:
29
23
  DB: sqlite3
30
24
  RAILS: ${{ matrix.rails }}
@@ -34,8 +28,7 @@ jobs:
34
28
  uses: ruby/setup-ruby@v1
35
29
  with:
36
30
  ruby-version: ${{ matrix.ruby }}
37
- - name: Install dependencies
38
- run: bundle install
31
+ bundler-cache: true
39
32
  - name: Run tests
40
33
  run: bundle exec rspec
41
34
 
@@ -45,20 +38,12 @@ jobs:
45
38
  fail-fast: false
46
39
  matrix:
47
40
  rails:
48
- - v6.1.1
49
- - v6.0.3
50
- - 6-0-stable
51
- - 5-2-stable
52
- - v5.2.4
41
+ - v7.0.3
42
+ - v6.1.6
53
43
  ruby:
54
- - 3.0.0
55
- - 2.7.2
56
- - 2.6.6
57
- exclude:
58
- - rails: v5.2.4
59
- ruby: 3.0.0
60
- - rails: 5-2-stable
61
- ruby: 3.0.0
44
+ - 3.1.2
45
+ - 3.0.4
46
+ - 2.7.6
62
47
  env:
63
48
  DB: mysql
64
49
  RAILS: ${{ matrix.rails }}
@@ -70,6 +55,7 @@ jobs:
70
55
  uses: ruby/setup-ruby@v1
71
56
  with:
72
57
  ruby-version: ${{ matrix.ruby }}
58
+ bundler-cache: true
73
59
  - name: Startup MySQL
74
60
  run: |
75
61
  sudo systemctl start mysql.service
@@ -77,8 +63,6 @@ jobs:
77
63
  run: |
78
64
  mysql --user=root --password=root --host=127.0.0.1 -e 'create database ransack collate utf8_general_ci;';
79
65
  mysql --user=root --password=root --host=127.0.0.1 -e 'use ransack;show variables like "%character%";show variables like "%collation%";';
80
- - name: Install dependencies
81
- run: bundle install
82
66
  - name: Run tests
83
67
  run: bundle exec rspec
84
68
 
@@ -88,20 +72,12 @@ jobs:
88
72
  fail-fast: false
89
73
  matrix:
90
74
  rails:
91
- - v6.1.1
92
- - v6.0.3
93
- - 6-0-stable
94
- - 5-2-stable
95
- - v5.2.4
75
+ - v7.0.3
76
+ - v6.1.6
96
77
  ruby:
97
- - 3.0.0
98
- - 2.7.2
99
- - 2.6.6
100
- exclude:
101
- - rails: v5.2.4
102
- ruby: 3.0.0
103
- - rails: 5-2-stable
104
- ruby: 3.0.0
78
+ - 3.1.2
79
+ - 3.0.4
80
+ - 2.7.6
105
81
  env:
106
82
  DB: postgres
107
83
  RAILS: ${{ matrix.rails }}
@@ -129,11 +105,10 @@ jobs:
129
105
  uses: ruby/setup-ruby@v1
130
106
  with:
131
107
  ruby-version: ${{ matrix.ruby }}
108
+ bundler-cache: true
132
109
  - name: Setup databases
133
110
  run: |
134
111
  psql -h localhost -p 5432 -W postgres -c 'create database ransack;' -U postgres;
135
- - name: Install dependencies
136
- run: bundle install
137
112
  - name: Run tests
138
113
  run: bundle exec rspec
139
114
 
@@ -144,9 +119,8 @@ jobs:
144
119
  - name: Set up Ruby
145
120
  uses: ruby/setup-ruby@v1
146
121
  with:
147
- ruby-version: 3.0.0
148
- - name: Install dependencies
149
- run: bundle install
122
+ ruby-version: 3.1.2
123
+ bundler-cache: true
150
124
  - name: Run bug report templates
151
125
  run: |
152
126
  ruby bug_report_templates/test-ransacker-arel-present-predicate.rb
data/.nojekyll ADDED
File without changes
data/.rubocop.yml CHANGED
@@ -30,6 +30,9 @@ Layout/SpaceInsideParens:
30
30
  Layout/TrailingEmptyLines:
31
31
  Enabled: true
32
32
 
33
+ Style/HashSyntax:
34
+ Enabled: true
35
+
33
36
  Style/RedundantFileExtensionInRequire:
34
37
  Enabled: true
35
38
 
data/CHANGELOG.md CHANGED
@@ -1,22 +1,219 @@
1
1
  # Change Log
2
2
 
3
- * Drop support for rubies under 2.5. PR #1189
3
+ ## Unreleased
4
4
 
5
- ## 2.4.1 - 2020-12-21
5
+ ## 4.0.0 - 2023-02-09
6
6
 
7
- * Add `ActiveRecord::Base.ransack!` which raises error if passed unknown condition
7
+ ### 💥 Breaking Changes
8
8
 
9
- *Aaron Lipman*
9
+ * **[SECURITY]** Require explict allowlisting of attributes and associations by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1400
10
+ * Remove Polyamorous entrypoint by @scarroll32 in https://github.com/activerecord-hackery/ransack/pull/1370
11
+ * Remove dead MongoDB code by @scarroll32 in https://github.com/activerecord-hackery/ransack/pull/1345
10
12
 
11
- ## 2.4.0 - 2020-11-27
13
+ ### 🚀 Features
14
+
15
+ * Add support for default predicates by @p8 in https://github.com/activerecord-hackery/ransack/pull/1384
16
+
17
+ ### 🐛 Bug Fixes
18
+
19
+ * Ignore `ActiveModel::RangeError` in Ransack conditions by @JunichiIto in https://github.com/activerecord-hackery/ransack/pull/1340
20
+ * Fix crash when using `q=string` as parameter by @stereobooster in https://github.com/activerecord-hackery/ransack/pull/1374
21
+ * Prevent changing host through params by @AndersGM in https://github.com/activerecord-hackery/ransack/pull/1391
22
+
23
+ ### 📝 Documentation
24
+
25
+ * Fix broken documentation link by @cpgo in https://github.com/activerecord-hackery/ransack/pull/1332
26
+ * Remove more old wiki references by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1333
27
+ * Improve some wording and correct some typos by @ydah in https://github.com/activerecord-hackery/ransack/pull/1336
28
+ * Add warning about necessary authorization by @AmShaegar13 in https://github.com/activerecord-hackery/ransack/pull/1367
29
+ * Fix required Ruby and Rails version in README by @tagliala in https://github.com/activerecord-hackery/ransack/pull/1389
30
+
31
+ ### 💅 Polish
32
+
33
+ * Implement CodeQL by @scarroll32 in https://github.com/activerecord-hackery/ransack/pull/1334
34
+ * Code quality improvements by @scarroll32 in https://github.com/activerecord-hackery/ransack/pull/1371
35
+ * Refactor adapters by @scarroll32 in https://github.com/activerecord-hackery/ransack/pull/1348
36
+ * Fix typo: teh -> the by @jdufresne in https://github.com/activerecord-hackery/ransack/pull/1387
37
+ * Fix broken link by @maful in https://github.com/activerecord-hackery/ransack/pull/1394
38
+
39
+ ### 🏠 Internal
40
+
41
+ * Bump docusaurus by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1338
42
+ * Update dependencies by @scarroll32 in https://github.com/activerecord-hackery/ransack/pull/1342
43
+ * Improve CI by @scarroll32 in https://github.com/activerecord-hackery/ransack/pull/1351
44
+ * Improve CONTRIBUTING.md by @scarroll32 in https://github.com/activerecord-hackery/ransack/pull/1347
45
+ * Add links to GitHub Discussions by @scarroll32 in https://github.com/activerecord-hackery/ransack/pull/1353
46
+ * Bump terser from 5.14.0 to 5.14.2 in /docs by @dependabot in https://github.com/activerecord-hackery/ransack/pull/1355
47
+ * Bump loader-utils from 2.0.2 to 2.0.3 in /docs by @dependabot in https://github.com/activerecord-hackery/ransack/pull/1372
48
+ * Bump loader-utils from 2.0.3 to 2.0.4 in /docs by @dependabot in https://github.com/activerecord-hackery/ransack/pull/1378
49
+ * Upgrade some documentation dependencies by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1379
50
+ * Upgrade local search plugin too by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1380
51
+ * Bump json5 from 2.2.1 to 2.2.3 in /docs by @dependabot in https://github.com/activerecord-hackery/ransack/pull/1390
52
+ * Bump ua-parser-js from 0.7.31 to 0.7.33 in /docs by @dependabot in https://github.com/activerecord-hackery/ransack/pull/1397
53
+ * Bump some doc deps by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1398
54
+ * Bump http-cache-semantics from 4.1.0 to 4.1.1 in /docs by @dependabot in https://github.com/activerecord-hackery/ransack/pull/1401
55
+
56
+ ## 3.2.1 - 2022-05-24
57
+
58
+ * Add search functionality to documentation site.
59
+ PR [1329](https://github.com/activerecord-hackery/ransack/pull/1329)
60
+
61
+ * Fix contributing URLs and syntax highlight in `README.md`.
62
+ PR [1326](https://github.com/activerecord-hackery/ransack/pull/1326)
63
+
64
+ * Cast PostgreSQL's `timestamptz` columns to time.
65
+ PR [1325](https://github.com/activerecord-hackery/ransack/pull/1325)
66
+
67
+ * Add Ruby and ERB syntax highlighting support to documentation site.
68
+ PR [1324](https://github.com/activerecord-hackery/ransack/pull/1324)
69
+
70
+ * Fix a wrong link in `CHANGELOG.md`.
71
+ PR [1323](https://github.com/activerecord-hackery/ransack/pull/1323)
72
+
73
+ * Fix links to bug report templates in `CONTRIBUTING.md`.
74
+ PR [1321](https://github.com/activerecord-hackery/ransack/pull/1321)
75
+
76
+ ## 3.2.0 - 2022-05-08
77
+
78
+ * Drop Rails 6.0 support.
79
+ PR [1318](https://github.com/activerecord-hackery/ransack/pull/1318)
80
+
81
+ * Exclude "host" from params sent to url generator.
82
+ PR [1317](https://github.com/activerecord-hackery/ransack/pull/1317)
83
+
84
+ ## 3.1.0 - 2022-04-21
85
+
86
+ * Fix predicate name in "Using Predicates" documentation page.
87
+ PR [1313](https://github.com/activerecord-hackery/ransack/pull/1313)
88
+
89
+ * Drop Ruby 2.6 support.
90
+ PR [1311](https://github.com/activerecord-hackery/ransack/pull/1311)
91
+
92
+ * Allow Ransack to be used with Rails 7.1.0.alpha.
93
+ PR [1309](https://github.com/activerecord-hackery/ransack/pull/1309)
94
+
95
+ * Put contributor list last in documentation site.
96
+ PR [1308](https://github.com/activerecord-hackery/ransack/pull/1308)
97
+
98
+ * Add `acts-as-taggable-on` and polymorphic searches to documentation.
99
+ PR [1306](https://github.com/activerecord-hackery/ransack/pull/1306)
100
+ PR [1312](https://github.com/activerecord-hackery/ransack/pull/1312)
101
+
102
+ * Add full link to issue about merging searches to documentation.
103
+ PR [1305](https://github.com/activerecord-hackery/ransack/pull/1305)
12
104
 
13
- * Support ActiveRecord 6.1.0.rc1.
14
- PR [1172](https://github.com/activerecord-hackery/ransack/pull/1172)
105
+ ## 3.0.1 - 2022-04-08
15
106
 
16
- * 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)
107
+ * Fix `:data` option to `sort_link` being incorrectly appended to the generated
108
+ link query parameters.
109
+ PR [1301](https://github.com/activerecord-hackery/ransack/pull/1301)
110
+
111
+ * Fix "Edit this page" links in documentation site
112
+ PR [1303](https://github.com/activerecord-hackery/ransack/pull/1303)
113
+
114
+ * Auto deploy documentation site after merging PRs
115
+ PR [1302](https://github.com/activerecord-hackery/ransack/pull/1302)
116
+
117
+ * Add list of former wiki contributors to documentation site
118
+ PR [1300](https://github.com/activerecord-hackery/ransack/pull/1300)
119
+
120
+ * Reduce gem package size
121
+ PR [1297](https://github.com/activerecord-hackery/ransack/pull/1297)
122
+
123
+ ## 3.0.0 - 2022-03-30
124
+
125
+ * Move documentation into Docusaurus.
126
+ PR [1291](https://github.com/activerecord-hackery/ransack/pull/1291)
127
+
128
+ * [BREAKING CHANGE] Remove deprecated `#search` method.
129
+ PR [1147](https://github.com/activerecord-hackery/ransack/pull/1147)
130
+
131
+ * Allow scopes that define string SQL joins.
132
+ PR [1225](https://github.com/activerecord-hackery/ransack/pull/1225)
133
+
134
+ * Improve `sort_link` documentation.
135
+ PR [1290](https://github.com/activerecord-hackery/ransack/pull/1290)
136
+
137
+ * Deprecate passing two trailing hashes to `sort_link`, for example:
138
+
139
+ ```ruby
140
+ sort_link(@q, :bussiness_name, "bussines_name", {}, class: "foo")
141
+ ```
142
+
143
+ Pass a single hash with all options instead.
144
+ PR [1289](https://github.com/activerecord-hackery/ransack/pull/1289)
145
+
146
+ * Fix `:class` option to `sort_link` not being passed to the generated link
147
+ correctly when no additional options are passed. For example:
148
+
149
+ ```ruby
150
+ sort_link(@q, :bussiness_name, class: "foo")
151
+ ```
152
+
153
+ PR [1288](https://github.com/activerecord-hackery/ransack/pull/1288)
154
+
155
+ * Evaluate `ransackable_scopes` before attributes when building the query.
156
+ PR [759](https://github.com/activerecord-hackery/ransack/pull/759)
157
+
158
+ ## 2.6.0 - 2022-03-08
159
+
160
+ * Fix regression when joining a table with itself.
161
+ PR [1275](https://github.com/activerecord-hackery/ransack/pull/1276)
162
+
163
+ * Drop support for ActiveRecord older than 6.0.4.
164
+ PR [1276](https://github.com/activerecord-hackery/ransack/pull/1276)
165
+
166
+ ## 2.5.0 - 2021-12-26
167
+
168
+ * Document release process by @scarroll32 in https://github.com/activerecord-hackery/ransack/pull/1199, https://github.com/activerecord-hackery/ransack/pull/1200.
169
+ * 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
170
+ * Fix for `ActiveRecord::UnknownAttributeReference` in ransack by @TechnologyHypofriend in https://github.com/activerecord-hackery/ransack/pull/1207
171
+ * Make gem compatible with old polyamorous require by @rtweeks in https://github.com/activerecord-hackery/ransack/pull/1145
172
+ * Adding swedish translations by @johanandre in https://github.com/activerecord-hackery/ransack/pull/1208
173
+ * Document how to do case insensitive searches by @scarroll32 in https://github.com/activerecord-hackery/ransack/pull/1213
174
+ * Add the ability to disable whitespace stripping for string searches by @DCrow in https://github.com/activerecord-hackery/ransack/pull/1214
175
+ * Fix `:default` option in `Translate.attribute` method by @coreyaus in https://github.com/activerecord-hackery/ransack/pull/1218
176
+ * Fix typo in README.md by @d-m-u in https://github.com/activerecord-hackery/ransack/pull/1220
177
+ * Fix another typo in README.md by @plan-do-break-fix in https://github.com/activerecord-hackery/ransack/pull/1221
178
+ * Fix several documentation typos @wonda-tea-coffee in https://github.com/activerecord-hackery/ransack/pull/1233
179
+ * Allow ransack to treat nulls as always first or last by @mollerhoj in https://github.com/activerecord-hackery/ransack/pull/1226
180
+ * Consider ransack aliases when sorting by @faragorn and @waldyr in https://github.com/activerecord-hackery/ransack/pull/1223
181
+ * Fix non-casted array predicates by @danielpclark in https://github.com/activerecord-hackery/ransack/pull/1246
182
+ * Remove Squeel references from README by @Schwad in https://github.com/activerecord-hackery/ransack/pull/1249
183
+ * Remove part of the README that might lead to incorrect results by @RadekMolenda in https://github.com/activerecord-hackery/ransack/pull/1258
184
+ * ActiveRecord 7.0 support
185
+
186
+ ## 2.4.2 - 2021-01-23
187
+
188
+ * Enable RuboCop and configure GitHub Actions to run RuboCop by @yahonda in https://github.com/activerecord-hackery/ransack/pull/1185
189
+ * Add Ruby 3.0.0 support by @yahonda in https://github.com/activerecord-hackery/ransack/pull/1190
190
+ * Drop Ruby 2.5 or older versions of Ruby by @yahonda in https://github.com/activerecord-hackery/ransack/pull/1189
191
+ * Move bug report templates into ransack repository and run templates at CI by @yahonda in https://github.com/activerecord-hackery/ransack/pull/1191
192
+ * Allow Ransack to be tested with Rails main branch by @yahonda in https://github.com/activerecord-hackery/ransack/pull/1192
193
+
194
+ ## 2.4.1 - 2020-12-21
195
+
196
+ * Links to Tidelift subscription by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1178
197
+ * Enable GitHub Actions by @yahonda in https://github.com/activerecord-hackery/ransack/pull/1180
198
+ * Move security contact information to SECURITY.md by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1179
199
+ * Add `ActiveRecord::Base.ransack!` which raises error if passed unknown condition by @alipman88 in https://github.com/activerecord-hackery/ransack/pull/1132
200
+ * Add ability to config PostgreSQL ORDER BY ... NULLS FIRST or NULLS LAST by @itsalongstory in https://github.com/activerecord-hackery/ransack/pull/1184
201
+
202
+ ## 2.4.0 - 2020-11-27
17
203
 
18
- * Drop support for ActiveRecord older than 5.2.4.
19
- PR [1166](https://github.com/activerecord-hackery/ransack/pull/1166)
204
+ * Specify actual version of polyamorous, so we can release that separately by @gregmolnar in https://github.com/activerecord-hackery/ransack/pull/1101
205
+ * Only include necessary files in gem package by @tvdeyen in https://github.com/activerecord-hackery/ransack/pull/1104
206
+ * Test/Fix for subquery in Rails 5.2.4 by @stevenjonescgm in https://github.com/activerecord-hackery/ransack/pull/1112
207
+ * Polyamorous module by @varyonic in https://github.com/activerecord-hackery/ransack/pull/1113
208
+ * Remove duplicated rows by @sasharevzin in https://github.com/activerecord-hackery/ransack/pull/1116
209
+ * Fix Ruby 2.7 deprecation warnings by @terracatta in https://github.com/activerecord-hackery/ransack/pull/1121
210
+ * Fixes polymorphic joins. by @PhilCoggins in https://github.com/activerecord-hackery/ransack/pull/1122
211
+ * Drop support for activerecord older than 5.2.4 by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1166
212
+ * Adapt to quoting change in Rails by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1165
213
+ * Typo in docs by @brett-anderson in https://github.com/activerecord-hackery/ransack/pull/1155
214
+ * Add Rails 6.1 support by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1172
215
+ * Strip Leading & Trailing Whitespace Before Searching by @itsalongstory in https://github.com/activerecord-hackery/ransack/pull/1126
216
+ * Use unfrozen version of symbol to string by @fauno in https://github.com/activerecord-hackery/ransack/pull/1149
20
217
 
21
218
  ## 2.3.2 - 2020-01-11
22
219
 
@@ -200,7 +397,7 @@
200
397
  ignored when block parameter is specified.
201
398
  PR [#818](https://github.com/activerecord-hackery/ransack/pull/818).
202
399
 
203
- * No need pass some arugments to JoinAssociation#join_constraints in Rails 5.1.
400
+ * No need pass some arguments to JoinAssociation#join_constraints in Rails 5.1.
204
401
  PR [#814](https://github.com/activerecord-hackery/ransack/pull/814).
205
402
  Fixes [#807](https://github.com/activerecord-hackery/ransack/issues/807).
206
403
  Reference [rails/rails#28267](https://github.com/rails/rails/pull/28267)