ransack 4.3.0 → 4.4.0

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.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -2
  3. data/lib/polyamorous/polyamorous.rb +1 -1
  4. data/lib/ransack/adapters/active_record/context.rb +30 -3
  5. data/lib/ransack/context.rb +3 -0
  6. data/lib/ransack/helpers/form_builder.rb +6 -7
  7. data/lib/ransack/helpers/form_helper.rb +86 -20
  8. data/lib/ransack/locale/ja.yml +51 -51
  9. data/lib/ransack/locale/ko.yml +6 -6
  10. data/lib/ransack/locale/uk.yml +72 -0
  11. data/lib/ransack/nodes/condition.rb +36 -6
  12. data/lib/ransack/nodes/grouping.rb +1 -1
  13. data/lib/ransack/nodes/sort.rb +1 -1
  14. data/lib/ransack/nodes/value.rb +9 -1
  15. data/lib/ransack/search.rb +1 -1
  16. data/lib/ransack/version.rb +1 -1
  17. data/lib/ransack.rb +8 -0
  18. data/spec/polyamorous/join_association_spec.rb +0 -1
  19. data/spec/polyamorous/join_dependency_spec.rb +0 -1
  20. data/spec/ransack/adapters/active_record/base_spec.rb +101 -2
  21. data/spec/ransack/adapters/active_record/context_spec.rb +72 -0
  22. data/spec/ransack/helpers/form_builder_spec.rb +0 -2
  23. data/spec/ransack/helpers/form_helper_spec.rb +219 -5
  24. data/spec/ransack/nodes/condition_spec.rb +229 -0
  25. data/spec/ransack/nodes/grouping_spec.rb +2 -2
  26. data/spec/ransack/nodes/value_spec.rb +12 -1
  27. data/spec/ransack/predicate_spec.rb +0 -1
  28. data/spec/ransack/search_spec.rb +107 -1
  29. data/spec/ransack/translate_spec.rb +0 -1
  30. data/spec/spec_helper.rb +2 -3
  31. data/spec/support/schema.rb +30 -0
  32. metadata +41 -87
  33. data/.github/FUNDING.yml +0 -3
  34. data/.github/SECURITY.md +0 -12
  35. data/.github/workflows/codeql.yml +0 -72
  36. data/.github/workflows/cronjob.yml +0 -141
  37. data/.github/workflows/deploy.yml +0 -35
  38. data/.github/workflows/rubocop.yml +0 -20
  39. data/.github/workflows/test-deploy.yml +0 -29
  40. data/.github/workflows/test.yml +0 -183
  41. data/.gitignore +0 -7
  42. data/.nojekyll +0 -0
  43. data/.rubocop.yml +0 -50
  44. data/CHANGELOG.md +0 -1193
  45. data/CONTRIBUTING.md +0 -171
  46. data/Gemfile +0 -58
  47. data/Rakefile +0 -24
  48. data/bug_report_templates/test-ransack-scope-and-column-same-name.rb +0 -78
  49. data/bug_report_templates/test-ransacker-arel-present-predicate.rb +0 -75
  50. data/docs/.gitignore +0 -19
  51. data/docs/.nojekyll +0 -0
  52. data/docs/babel.config.js +0 -3
  53. data/docs/blog/2022-03-27-ransack-3.0.0.md +0 -20
  54. data/docs/docs/getting-started/_category_.json +0 -4
  55. data/docs/docs/getting-started/advanced-mode.md +0 -46
  56. data/docs/docs/getting-started/configuration.md +0 -47
  57. data/docs/docs/getting-started/search-matches.md +0 -67
  58. data/docs/docs/getting-started/simple-mode.md +0 -289
  59. data/docs/docs/getting-started/sorting.md +0 -71
  60. data/docs/docs/getting-started/using-predicates.md +0 -282
  61. data/docs/docs/going-further/_category_.json +0 -4
  62. data/docs/docs/going-further/acts-as-taggable-on.md +0 -114
  63. data/docs/docs/going-further/associations.md +0 -70
  64. data/docs/docs/going-further/custom-predicates.md +0 -52
  65. data/docs/docs/going-further/documentation.md +0 -43
  66. data/docs/docs/going-further/exporting-to-csv.md +0 -49
  67. data/docs/docs/going-further/external-guides.md +0 -57
  68. data/docs/docs/going-further/form-customisation.md +0 -63
  69. data/docs/docs/going-further/i18n.md +0 -53
  70. data/docs/docs/going-further/img/create_release.png +0 -0
  71. data/docs/docs/going-further/merging-searches.md +0 -41
  72. data/docs/docs/going-further/other-notes.md +0 -425
  73. data/docs/docs/going-further/polymorphic-search.md +0 -46
  74. data/docs/docs/going-further/ransackers.md +0 -331
  75. data/docs/docs/going-further/release_process.md +0 -36
  76. data/docs/docs/going-further/saving-queries.md +0 -82
  77. data/docs/docs/going-further/searching-postgres.md +0 -57
  78. data/docs/docs/going-further/wiki-contributors.md +0 -82
  79. data/docs/docs/intro.md +0 -99
  80. data/docs/docusaurus.config.js +0 -120
  81. data/docs/package.json +0 -42
  82. data/docs/sidebars.js +0 -31
  83. data/docs/src/components/HomepageFeatures/index.js +0 -64
  84. data/docs/src/components/HomepageFeatures/styles.module.css +0 -11
  85. data/docs/src/css/custom.css +0 -39
  86. data/docs/src/pages/index.module.css +0 -23
  87. data/docs/src/pages/markdown-page.md +0 -7
  88. data/docs/static/.nojekyll +0 -0
  89. data/docs/static/img/docusaurus.png +0 -0
  90. data/docs/static/img/favicon.ico +0 -0
  91. data/docs/static/img/logo.svg +0 -1
  92. data/docs/static/img/tutorial/docsVersionDropdown.png +0 -0
  93. data/docs/static/img/tutorial/localeDropdown.png +0 -0
  94. data/docs/static/img/undraw_docusaurus_mountain.svg +0 -171
  95. data/docs/static/img/undraw_docusaurus_react.svg +0 -170
  96. data/docs/static/img/undraw_docusaurus_tree.svg +0 -40
  97. data/docs/static/logo/ransack-h.png +0 -0
  98. data/docs/static/logo/ransack-h.svg +0 -34
  99. data/docs/static/logo/ransack-v.png +0 -0
  100. data/docs/static/logo/ransack-v.svg +0 -34
  101. data/docs/static/logo/ransack.png +0 -0
  102. data/docs/static/logo/ransack.svg +0 -21
  103. data/docs/yarn.lock +0 -8884
  104. data/ransack.gemspec +0 -26
data/CHANGELOG.md DELETED
@@ -1,1193 +0,0 @@
1
- # Change Log
2
-
3
- ## Unreleased
4
-
5
- ## 4.3.0 - 2025-2-7
6
-
7
- * Fix wildcard escaping with PostGIS adapter.
8
- * Rails 8 compatibility
9
- * Drop Rails 6 and 7.0 compatibility
10
- * Raise Ransack::InvalidSearchError instead of ArgumentError on unknown conditions
11
-
12
- ## 4.2.1 - 2024-8-11
13
-
14
- * Fix Rails 7.1.x compatibility
15
-
16
- ## 4.2.0 - 2024-7-10
17
-
18
- * Add Rails 7.2 support by @robinator and @gregmolnar
19
-
20
- ## 4.1.0 - 2023-10-23
21
-
22
- ### 🚀 Features
23
-
24
- * Add Rails 7.1.0 support by @yuki24 in https://github.com/activerecord-hackery/ransack/pull/1439
25
-
26
- ### 🐛 Bug Fixes
27
-
28
- * Fix wrong table aliases in Rails 6.1 by @oneiros in https://github.com/activerecord-hackery/ransack/pull/1447
29
-
30
- ### 💦 Compatibility
31
-
32
- * Drop Ruby 2.7 support by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1449
33
-
34
- ### 📝 Documentation
35
-
36
- * Update blog post link by @meg-gutshall in https://github.com/activerecord-hackery/ransack/pull/1425
37
- * Add namespaced example of Polymorphic search by @craigmcnamara in https://github.com/activerecord-hackery/ransack/pull/1422
38
- * Update sorting example to be self-contained by @kinduff in https://github.com/activerecord-hackery/ransack/pull/1442
39
-
40
- ### 💅 Polish
41
-
42
- * Minor updates for Rails 7.1 by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1448
43
- * Don't mention Ruby compatibility in contribution instructions by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1452
44
-
45
- ### 🏠 Internal
46
-
47
- * Bump @sideway/formula from 3.0.0 to 3.0.1 in /docs by @dependabot in https://github.com/activerecord-hackery/ransack/pull/1417
48
- * Bump webpack from 5.74.0 to 5.76.1 in /docs by @dependabot in https://github.com/activerecord-hackery/ransack/pull/1412
49
- * Bump semver from 5.7.1 to 5.7.2 in /docs by @dependabot in https://github.com/activerecord-hackery/ransack/pull/1431
50
- * Bump @babel/traverse from 7.18.2 to 7.23.2 in /docs by @dependabot in https://github.com/activerecord-hackery/ransack/pull/1446
51
- * Bump postcss from 8.4.14 to 8.4.31 in /docs by @dependabot in https://github.com/activerecord-hackery/ransack/pull/1443
52
- * Bump dns-packet from 5.3.1 to 5.6.1 in /docs by @dependabot in https://github.com/activerecord-hackery/ransack/pull/1450
53
- * Test with Ruby 3.2 by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1451
54
- * Misc CI bumps by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1453
55
- * RuboCop tweaks by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1454
56
-
57
- ## 4.0.0 - 2023-02-09
58
-
59
- ### 💥 Breaking Changes
60
-
61
- * **[SECURITY]** Require explicit allowlisting of attributes and associations by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1400
62
- * Remove Polyamorous entrypoint by @scarroll32 in https://github.com/activerecord-hackery/ransack/pull/1370
63
- * Remove dead MongoDB code by @scarroll32 in https://github.com/activerecord-hackery/ransack/pull/1345
64
-
65
- ### 🚀 Features
66
-
67
- * Add support for default predicates by @p8 in https://github.com/activerecord-hackery/ransack/pull/1384
68
-
69
- ### 🐛 Bug Fixes
70
-
71
- * Ignore `ActiveModel::RangeError` in Ransack conditions by @JunichiIto in https://github.com/activerecord-hackery/ransack/pull/1340
72
- * Fix crash when using `q=string` as parameter by @stereobooster in https://github.com/activerecord-hackery/ransack/pull/1374
73
- * Prevent changing host through params by @AndersGM in https://github.com/activerecord-hackery/ransack/pull/1391
74
-
75
- ### 📝 Documentation
76
-
77
- * Fix broken documentation link by @cpgo in https://github.com/activerecord-hackery/ransack/pull/1332
78
- * Remove more old wiki references by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1333
79
- * Improve some wording and correct some typos by @ydah in https://github.com/activerecord-hackery/ransack/pull/1336
80
- * Add warning about necessary authorization by @AmShaegar13 in https://github.com/activerecord-hackery/ransack/pull/1367
81
- * Fix required Ruby and Rails version in README by @tagliala in https://github.com/activerecord-hackery/ransack/pull/1389
82
-
83
- ### 💅 Polish
84
-
85
- * Implement CodeQL by @scarroll32 in https://github.com/activerecord-hackery/ransack/pull/1334
86
- * Code quality improvements by @scarroll32 in https://github.com/activerecord-hackery/ransack/pull/1371
87
- * Refactor adapters by @scarroll32 in https://github.com/activerecord-hackery/ransack/pull/1348
88
- * Fix typo: teh -> the by @jdufresne in https://github.com/activerecord-hackery/ransack/pull/1387
89
- * Fix broken link by @maful in https://github.com/activerecord-hackery/ransack/pull/1394
90
-
91
- ### 🏠 Internal
92
-
93
- * Bump docusaurus by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1338
94
- * Update dependencies by @scarroll32 in https://github.com/activerecord-hackery/ransack/pull/1342
95
- * Improve CI by @scarroll32 in https://github.com/activerecord-hackery/ransack/pull/1351
96
- * Improve CONTRIBUTING.md by @scarroll32 in https://github.com/activerecord-hackery/ransack/pull/1347
97
- * Add links to GitHub Discussions by @scarroll32 in https://github.com/activerecord-hackery/ransack/pull/1353
98
- * Bump terser from 5.14.0 to 5.14.2 in /docs by @dependabot in https://github.com/activerecord-hackery/ransack/pull/1355
99
- * Bump loader-utils from 2.0.2 to 2.0.3 in /docs by @dependabot in https://github.com/activerecord-hackery/ransack/pull/1372
100
- * Bump loader-utils from 2.0.3 to 2.0.4 in /docs by @dependabot in https://github.com/activerecord-hackery/ransack/pull/1378
101
- * Upgrade some documentation dependencies by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1379
102
- * Upgrade local search plugin too by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1380
103
- * Bump json5 from 2.2.1 to 2.2.3 in /docs by @dependabot in https://github.com/activerecord-hackery/ransack/pull/1390
104
- * 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
105
- * Bump some doc deps by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1398
106
- * 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
107
-
108
- ## 3.2.1 - 2022-05-24
109
-
110
- * Add search functionality to documentation site.
111
- PR [1329](https://github.com/activerecord-hackery/ransack/pull/1329)
112
-
113
- * Fix contributing URLs and syntax highlight in `README.md`.
114
- PR [1326](https://github.com/activerecord-hackery/ransack/pull/1326)
115
-
116
- * Cast PostgreSQL's `timestamptz` columns to time.
117
- PR [1325](https://github.com/activerecord-hackery/ransack/pull/1325)
118
-
119
- * Add Ruby and ERB syntax highlighting support to documentation site.
120
- PR [1324](https://github.com/activerecord-hackery/ransack/pull/1324)
121
-
122
- * Fix a wrong link in `CHANGELOG.md`.
123
- PR [1323](https://github.com/activerecord-hackery/ransack/pull/1323)
124
-
125
- * Fix links to bug report templates in `CONTRIBUTING.md`.
126
- PR [1321](https://github.com/activerecord-hackery/ransack/pull/1321)
127
-
128
- ## 3.2.0 - 2022-05-08
129
-
130
- * Drop Rails 6.0 support.
131
- PR [1318](https://github.com/activerecord-hackery/ransack/pull/1318)
132
-
133
- * Exclude "host" from params sent to url generator.
134
- PR [1317](https://github.com/activerecord-hackery/ransack/pull/1317)
135
-
136
- ## 3.1.0 - 2022-04-21
137
-
138
- * Fix predicate name in "Using Predicates" documentation page.
139
- PR [1313](https://github.com/activerecord-hackery/ransack/pull/1313)
140
-
141
- * Drop Ruby 2.6 support.
142
- PR [1311](https://github.com/activerecord-hackery/ransack/pull/1311)
143
-
144
- * Allow Ransack to be used with Rails 7.1.0.alpha.
145
- PR [1309](https://github.com/activerecord-hackery/ransack/pull/1309)
146
-
147
- * Put contributor list last in documentation site.
148
- PR [1308](https://github.com/activerecord-hackery/ransack/pull/1308)
149
-
150
- * Add `acts-as-taggable-on` and polymorphic searches to documentation.
151
- PR [1306](https://github.com/activerecord-hackery/ransack/pull/1306)
152
- PR [1312](https://github.com/activerecord-hackery/ransack/pull/1312)
153
-
154
- * Add full link to issue about merging searches to documentation.
155
- PR [1305](https://github.com/activerecord-hackery/ransack/pull/1305)
156
-
157
- ## 3.0.1 - 2022-04-08
158
-
159
- * Fix `:data` option to `sort_link` being incorrectly appended to the generated
160
- link query parameters.
161
- PR [1301](https://github.com/activerecord-hackery/ransack/pull/1301)
162
-
163
- * Fix "Edit this page" links in documentation site
164
- PR [1303](https://github.com/activerecord-hackery/ransack/pull/1303)
165
-
166
- * Auto deploy documentation site after merging PRs
167
- PR [1302](https://github.com/activerecord-hackery/ransack/pull/1302)
168
-
169
- * Add list of former wiki contributors to documentation site
170
- PR [1300](https://github.com/activerecord-hackery/ransack/pull/1300)
171
-
172
- * Reduce gem package size
173
- PR [1297](https://github.com/activerecord-hackery/ransack/pull/1297)
174
-
175
- ## 3.0.0 - 2022-03-30
176
-
177
- * Move documentation into Docusaurus.
178
- PR [1291](https://github.com/activerecord-hackery/ransack/pull/1291)
179
-
180
- * [BREAKING CHANGE] Remove deprecated `#search` method.
181
- PR [1147](https://github.com/activerecord-hackery/ransack/pull/1147)
182
-
183
- * Allow scopes that define string SQL joins.
184
- PR [1225](https://github.com/activerecord-hackery/ransack/pull/1225)
185
-
186
- * Improve `sort_link` documentation.
187
- PR [1290](https://github.com/activerecord-hackery/ransack/pull/1290)
188
-
189
- * Deprecate passing two trailing hashes to `sort_link`, for example:
190
-
191
- ```ruby
192
- sort_link(@q, :bussiness_name, "bussines_name", {}, class: "foo")
193
- ```
194
-
195
- Pass a single hash with all options instead.
196
- PR [1289](https://github.com/activerecord-hackery/ransack/pull/1289)
197
-
198
- * Fix `:class` option to `sort_link` not being passed to the generated link
199
- correctly when no additional options are passed. For example:
200
-
201
- ```ruby
202
- sort_link(@q, :bussiness_name, class: "foo")
203
- ```
204
-
205
- PR [1288](https://github.com/activerecord-hackery/ransack/pull/1288)
206
-
207
- * Evaluate `ransackable_scopes` before attributes when building the query.
208
- PR [759](https://github.com/activerecord-hackery/ransack/pull/759)
209
-
210
- ## 2.6.0 - 2022-03-08
211
-
212
- * Fix regression when joining a table with itself.
213
- PR [1275](https://github.com/activerecord-hackery/ransack/pull/1276)
214
-
215
- * Drop support for ActiveRecord older than 6.0.4.
216
- PR [1276](https://github.com/activerecord-hackery/ransack/pull/1276)
217
-
218
- ## 2.5.0 - 2021-12-26
219
-
220
- * Document release process by @scarroll32 in https://github.com/activerecord-hackery/ransack/pull/1199, https://github.com/activerecord-hackery/ransack/pull/1200.
221
- * 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
222
- * Fix for `ActiveRecord::UnknownAttributeReference` in ransack by @TechnologyHypofriend in https://github.com/activerecord-hackery/ransack/pull/1207
223
- * Make gem compatible with old polyamorous require by @rtweeks in https://github.com/activerecord-hackery/ransack/pull/1145
224
- * Adding swedish translations by @johanandre in https://github.com/activerecord-hackery/ransack/pull/1208
225
- * Document how to do case insensitive searches by @scarroll32 in https://github.com/activerecord-hackery/ransack/pull/1213
226
- * Add the ability to disable whitespace stripping for string searches by @DCrow in https://github.com/activerecord-hackery/ransack/pull/1214
227
- * Fix `:default` option in `Translate.attribute` method by @coreyaus in https://github.com/activerecord-hackery/ransack/pull/1218
228
- * Fix typo in README.md by @d-m-u in https://github.com/activerecord-hackery/ransack/pull/1220
229
- * Fix another typo in README.md by @plan-do-break-fix in https://github.com/activerecord-hackery/ransack/pull/1221
230
- * Fix several documentation typos @wonda-tea-coffee in https://github.com/activerecord-hackery/ransack/pull/1233
231
- * Allow ransack to treat nulls as always first or last by @mollerhoj in https://github.com/activerecord-hackery/ransack/pull/1226
232
- * Consider ransack aliases when sorting by @faragorn and @waldyr in https://github.com/activerecord-hackery/ransack/pull/1223
233
- * Fix non-casted array predicates by @danielpclark in https://github.com/activerecord-hackery/ransack/pull/1246
234
- * Remove Squeel references from README by @Schwad in https://github.com/activerecord-hackery/ransack/pull/1249
235
- * Remove part of the README that might lead to incorrect results by @RadekMolenda in https://github.com/activerecord-hackery/ransack/pull/1258
236
- * ActiveRecord 7.0 support
237
-
238
- ## 2.4.2 - 2021-01-23
239
-
240
- * Enable RuboCop and configure GitHub Actions to run RuboCop by @yahonda in https://github.com/activerecord-hackery/ransack/pull/1185
241
- * Add Ruby 3.0.0 support by @yahonda in https://github.com/activerecord-hackery/ransack/pull/1190
242
- * Drop Ruby 2.5 or older versions of Ruby by @yahonda in https://github.com/activerecord-hackery/ransack/pull/1189
243
- * Move bug report templates into ransack repository and run templates at CI by @yahonda in https://github.com/activerecord-hackery/ransack/pull/1191
244
- * Allow Ransack to be tested with Rails main branch by @yahonda in https://github.com/activerecord-hackery/ransack/pull/1192
245
-
246
- ## 2.4.1 - 2020-12-21
247
-
248
- * Links to Tidelift subscription by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1178
249
- * Enable GitHub Actions by @yahonda in https://github.com/activerecord-hackery/ransack/pull/1180
250
- * Move security contact information to SECURITY.md by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1179
251
- * Add `ActiveRecord::Base.ransack!` which raises error if passed unknown condition by @alipman88 in https://github.com/activerecord-hackery/ransack/pull/1132
252
- * Add ability to config PostgreSQL ORDER BY ... NULLS FIRST or NULLS LAST by @itsalongstory in https://github.com/activerecord-hackery/ransack/pull/1184
253
-
254
- ## 2.4.0 - 2020-11-27
255
-
256
- * Specify actual version of polyamorous, so we can release that separately by @gregmolnar in https://github.com/activerecord-hackery/ransack/pull/1101
257
- * Only include necessary files in gem package by @tvdeyen in https://github.com/activerecord-hackery/ransack/pull/1104
258
- * Test/Fix for subquery in Rails 5.2.4 by @stevenjonescgm in https://github.com/activerecord-hackery/ransack/pull/1112
259
- * Polyamorous module by @varyonic in https://github.com/activerecord-hackery/ransack/pull/1113
260
- * Remove duplicated rows by @sasharevzin in https://github.com/activerecord-hackery/ransack/pull/1116
261
- * Fix Ruby 2.7 deprecation warnings by @terracatta in https://github.com/activerecord-hackery/ransack/pull/1121
262
- * Fixes polymorphic joins. by @PhilCoggins in https://github.com/activerecord-hackery/ransack/pull/1122
263
- * Drop support for activerecord older than 5.2.4 by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1166
264
- * Adapt to quoting change in Rails by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1165
265
- * Typo in docs by @brett-anderson in https://github.com/activerecord-hackery/ransack/pull/1155
266
- * Add Rails 6.1 support by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1172
267
- * Strip Leading & Trailing Whitespace Before Searching by @itsalongstory in https://github.com/activerecord-hackery/ransack/pull/1126
268
- * Use unfrozen version of symbol to string by @fauno in https://github.com/activerecord-hackery/ransack/pull/1149
269
-
270
- ## 2.3.2 - 2020-01-11
271
-
272
- * Breakfix to bump Polyamorous
273
-
274
- ## 2.3.1 - 2020-01-11
275
-
276
- * Drop support for Active Record 5.0, 5.1, and 5.2.0.
277
- PR [#1073](https://github.com/activerecord-hackery/ransack/pull/1073)
278
-
279
- * Drop support for rubies under 2.3.
280
- PR [#1070](https://github.com/activerecord-hackery/ransack/pull/1070)
281
-
282
- ... and others
283
-
284
- ## 2.3.0 - 2019-08-18
285
-
286
- * Arabic translations PR [979](https://github.com/activerecord-hackery/ransack/pull/979)
287
-
288
- * Rails 6 PR [1027](https://github.com/activerecord-hackery/ransack/pull/1027)
289
- *vrodokanakis*
290
-
291
- * Make polyamorous a separate gem PR [1002](https://github.com/activerecord-hackery/ransack/pull/1002)
292
-
293
- * Catalan translations PR[1007](https://github.com/activerecord-hackery/ransack/pull/1007)
294
- *roslavych*
295
-
296
- * Don't escape period characters with wildcard searches in mysql2 PR [1013](https://github.com/activerecord-hackery/ransack/pull/1013)
297
- *daflip*
298
-
299
- * Farsi translations PR [1030](https://github.com/activerecord-hackery/ransack/pull/1030)
300
-
301
- * Finnish translations PR [1049](https://github.com/activerecord-hackery/ransack/pull/1049)
302
-
303
- * Fix wrong table alias when using nested join. for ActiveRecord >= 5.2
304
- PR [374](https://github.com/activerecord-hackery/ransack/pull/374)
305
-
306
- *hiichan*
307
-
308
- ## Version 2.1.1 - 2018-12-05
309
-
310
- * Add `arabic` translation
311
- https://github.com/activerecord-hackery/ransack/pull/979
312
-
313
- * Deprecate #search
314
- PR [975](https://github.com/activerecord-hackery/ransack/pull/975)
315
-
316
- ## Version 2.1.0 - 2018-10-26
317
-
318
- * Add support for sorting by scopes
319
- PR [973](https://github.com/activerecord-hackery/ransack/pull/973)
320
-
321
- *Diego Borges*
322
-
323
- * Added a new logo for Ransack
324
- PR [972](https://github.com/activerecord-hackery/ransack/pull/972)
325
-
326
- *Anıl Kılıç*, *Greg Molnar*
327
-
328
- * Greek translations
329
- PR [971](https://github.com/activerecord-hackery/ransack/pull/971)
330
- PR [960](https://github.com/activerecord-hackery/ransack/pull/960)
331
-
332
- *Sean Carroll*, *Greg Molnar*
333
-
334
- * README improvements
335
- PR [963](https://github.com/activerecord-hackery/ransack/pull/963)
336
-
337
- *tommaso1*
338
-
339
- * Bulgarian translations
340
- PR [961](https://github.com/activerecord-hackery/ransack/pull/961)
341
-
342
- *Sean Carroll*
343
-
344
- * README improvements
345
- PR [956](https://github.com/activerecord-hackery/ransack/pull/956)
346
-
347
- *Alex Konoval*
348
-
349
- * Remove lib/ransack/adapters/active_record/compat.rb
350
- PR [954](https://github.com/activerecord-hackery/ransack/pull/954)
351
-
352
- *Ryuta Kamizono*
353
-
354
- * Remove unused aliases
355
- PR [953](https://github.com/activerecord-hackery/ransack/pull/953)
356
-
357
- *Ryuta Kamizono*
358
-
359
- ## Version 2.0.1 - 2018-08-18
360
-
361
- * Don't return association if table is nil
362
- PR [952](https://github.com/activerecord-hackery/ransack/pull/952)
363
-
364
- *Christian Gregg*
365
-
366
- ## Version 2.0.0 - 2018-08-09
367
-
368
- * Add support for Active Record 5.2.1
369
- PR [#938](https://github.com/activerecord-hackery/ransack/pull/938)
370
-
371
- * Fix sort with joins on existing association
372
- PR [#937](https://github.com/activerecord-hackery/ransack/pull/937)
373
-
374
- * Add the ability to skip arg sanitization on a per scope basis. Using
375
- `ransackable_scopes_skip_sanitize_args`, users can define a list of
376
- scopes which will bypass parameter sanitization. This allows passing 0,
377
- 1, t, f, etc. to a scope as an actual parameter.
378
- PR [#933](https://github.com/activerecord-hackery/ransack/pull/933)
379
-
380
- * Drop support for Active Record < 5.0.
381
- PR [#929](https://github.com/activerecord-hackery/ransack/pull/929)
382
-
383
- * Extract mongoid support to a separate gem.
384
- PR [#928](https://github.com/activerecord-hackery/ransack/pull/928)
385
-
386
- * Absorb polyamorous
387
- PR [#927](https://github.com/activerecord-hackery/ransack/pull/927)
388
-
389
- * Fix broken monkey patch of #form_with
390
- PR [#922](https://github.com/activerecord-hackery/ransack/pull/922)
391
-
392
- ## Version 1.8.8 - 2018-03-16
393
- * Fix multiple database support
394
- PR [#893](https://github.com/activerecord-hackery/ransack/pull/893)
395
-
396
- * Updated Dutch translations
397
- PR [#887](https://github.com/activerecord-hackery/ransack/pull/887)
398
-
399
- * Fixed no method error 'asc' for Rails 4.2
400
- PR [#885](https://github.com/activerecord-hackery/ransack/pull/885)
401
-
402
-
403
- ## Version 1.8.7 - 2018-02-05
404
-
405
- * Rails 5.2 support
406
- PR [#868](https://github.com/activerecord-hackery/ransack/pull/868)
407
-
408
- * Lock pg gem to 0.21 to support older releases
409
-
410
- * Warnings cleanup
411
- PR [#867](https://github.com/activerecord-hackery/ransack/pull/867)
412
-
413
- * Wildcard escaping
414
- PR [#866]
415
-
416
- ## Version 1.8.6 - 2018-01-23
417
-
418
- ### Added
419
-
420
- * Improve memory usage
421
- PR [#820](https://github.com/activerecord-hackery/ransack/pull/820)
422
-
423
- * Bump Polyamorous version to 1.3.2
424
- PR [#858](https://github.com/activerecord-hackery/ransack/pull/858)
425
-
426
- ## Version 1.8.5
427
-
428
- ### Added
429
-
430
- * Added Turkish Translations
431
- PR [#835](https://github.com/activerecord-hackery/ransack/issues/835).
432
-
433
- ## Version 1.8.4 - 2017-10-09
434
-
435
- ### Added
436
-
437
- * Added italian translations.
438
- PR [#833](https://github.com/activerecord-hackery/ransack/pull/833).
439
-
440
- * Add an optional default arrow for unsorted fields.
441
- PR [#816](https://github.com/activerecord-hackery/ransack/pull/816/files).
442
-
443
- ### Fixed
444
-
445
- * Cast Postgres money type to float.
446
- PR [#823](https://github.com/activerecord-hackery/ransack/pull/823).
447
-
448
- * Fix the bug in sort_link, which causes the multiple fields option to be
449
- ignored when block parameter is specified.
450
- PR [#818](https://github.com/activerecord-hackery/ransack/pull/818).
451
-
452
- * No need pass some arguments to JoinAssociation#join_constraints in Rails 5.1.
453
- PR [#814](https://github.com/activerecord-hackery/ransack/pull/814).
454
- Fixes [#807](https://github.com/activerecord-hackery/ransack/issues/807).
455
- Reference [rails/rails#28267](https://github.com/rails/rails/pull/28267)
456
- and [rails/rails#27851](https://github.com/rails/rails/pull/27851).
457
-
458
- ## Version 1.8.3 - 2017-06-15
459
-
460
- ### Added
461
-
462
- * Add a config option to customize the up and down arrows used for direction
463
- indicators in Ransack sort links.
464
- PR [#726](https://github.com/activerecord-hackery/ransack/pull/726).
465
-
466
- *Garett Arrowood*
467
-
468
- * Add ability to turn off sanitization of custom scope arguments.
469
- PR [#742](https://github.com/activerecord-hackery/ransack/pull/742).
470
-
471
- *Garett Arrowood*
472
-
473
- ### Fixed
474
-
475
- * Use class attributes properly so that inheritance is respected.
476
- PR [#717](https://github.com/activerecord-hackery/ransack/pull/717).
477
- This fixes two bugs:
478
-
479
- 1. In the Mongoid adapter, subclasses were not properly inheriting their
480
- parents' Ransack aliases because each class defined its own set of
481
- aliases.
482
-
483
- 2. In the Active Record adapter, Ransack aliases were defined in such a way
484
- that the parent's (and grandparent's, etc.) aliases were overwritten by
485
- the child, meaning that all aliases were ultimately kept on
486
- `ActiveRecord::Base`. This had the unfortunate effect of enforcing
487
- uniqueness of Ransack alias names across all models rather than per
488
- model. Depending on the load order of models, earlier definitions of an
489
- alias in other models were clobbered.
490
-
491
- *Steve Richert (laserlemon)*
492
-
493
- * Use `ActiveSupport.on_load` hooks to include Ransack in Active Record,
494
- avoiding autoloading the constant too soon. PR
495
- [#719](https://github.com/activerecord-hackery/ransack/pull/719). Reference:
496
- [This comment in rails#23589]
497
- (https://github.com/rails/rails/issues/23589#issuecomment-229247727).
498
-
499
- *Yuji Yaginuma (y-yagi)*
500
-
501
- ## Version 1.8.2 - 2016-08-08
502
- ### Fixed
503
-
504
- * Fix empty attribute_fields regression in advanced search mode introduced by
505
- [235eae3](https://github.com/activerecord-hackery/ransack/commit/235eae3).
506
- Closes
507
- [#701](https://github.com/activerecord-hackery/ransack/issues/701). Commit
508
- [2839acf](https://github.com/activerecord-hackery/ransack/commit/2839acf).
509
-
510
- *Jon Atack, Jay Dorsey, Stefan Haslinger, Igor Kasyanchuk*
511
-
512
- ### Added
513
-
514
- * Add `sort_url` view helper that returns only the url of a `sort_link`. PR
515
- [#706](https://github.com/activerecord-hackery/ransack/pull/706).
516
-
517
- *amatotsuji*
518
-
519
- ## Version 1.8.1 - 2016-07-27
520
- ### Fixed
521
-
522
- * Fix `rake console` to run a command-line console with ransack + seed data.
523
- Commits
524
- [2cc781e](https://github.com/activerecord-hackery/ransack/commit/2cc781e),
525
- [f2e85ad](https://github.com/activerecord-hackery/ransack/commit/f2e85ad),
526
- [6a059ba](https://github.com/activerecord-hackery/ransack/commit/6a059ba).
527
-
528
- *Jon Atack*
529
-
530
- * Fix returned value of `Ransack::Nodes::Condition#format_predicate`. PR
531
- [#692](https://github.com/activerecord-hackery/ransack/pull/692).
532
-
533
- *Masahiro Saito*
534
-
535
- * Better test coverage on passing arrays to ransackers. Commit
536
- [98df2c5](https://github.com/activerecord-hackery/ransack/commit/98df2c5).
537
-
538
- *Jon Atack*
539
-
540
- * Fix missing Ransack::Constants::ASC constant. Commit
541
- [aece23c](https://github.com/activerecord-hackery/ransack/commit/aece23c).
542
-
543
- *Jon Atack*
544
-
545
- ### Changed
546
-
547
- * Replace arrow constants with frozen strings in public methods. Commits
548
- [c0dff33](https://github.com/activerecord-hackery/ransack/commit/c0dff33),
549
- [e489ca7](https://github.com/activerecord-hackery/ransack/commit/e489ca7).
550
-
551
- *Jon Atack*
552
-
553
- ## Version 1.8.0 - 2016-07-14
554
- ### Added
555
-
556
- * Support Mongoid 5. PR [#636](https://github.com/activerecord-hackery/ransack/pull/636), commit
557
- [9e5faf4](https://github.com/activerecord-hackery/ransack/commit/9e5faf4).
558
-
559
- *Josef Šimánek*
560
-
561
- * Add optional block argument for the `sort_link` method. PR
562
- [#604](https://github.com/activerecord-hackery/ransack/pull/604).
563
-
564
- *Andrea Dal Ponte*
565
-
566
- * Add `ransack_alias` to allow users to customize the names for long
567
- ransack field names. PR
568
- [#623](https://github.com/activerecord-hackery/ransack/pull/623).
569
-
570
- *Ray Zane*
571
-
572
- * Add support for searching on attributes that have been added to
573
- Active Record models with `alias_attribute` (Rails >= 4 only). PR
574
- [#592](https://github.com/activerecord-hackery/ransack/pull/592), commit
575
- [549342a](https://github.com/activerecord-hackery/ransack/commit/549342a).
576
-
577
- *Marten Schilstra*
578
-
579
- * Add ability to globally hide sort link order indicator arrows with
580
- `Ransack.configure#hide_sort_order_indicators = true`. PR
581
- [#577](https://github.com/activerecord-hackery/ransack/pull/577), commit
582
- [95d4591](https://github.com/activerecord-hackery/ransack/commit/95d4591).
583
-
584
- *Josh Hunter*, *Jon Atack*
585
-
586
- * Add test for `ActionController:Parameter` object params in `sort_link` to
587
- ensure Ransack is handling the Rails 5 changes correctly. Commit
588
- [b1cfed8](https://github.com/activerecord-hackery/ransack/commit/b1cfed8).
589
-
590
- *Ryan Wood*
591
-
592
- * Add failing tests to facilitate work on issue
593
- [#566](https://github.com/activerecord-hackery/ransack/issues/566)
594
- of passing boolean values to search scopes. PR
595
- [#575](https://github.com/activerecord-hackery/ransack/pull/575).
596
-
597
- *Marcel Eeken*
598
-
599
- * Add i18n locale files:
600
- * Taiwanese Hokkien/Mandarin (`zh-TW.yml`). PR
601
- [#674](https://github.com/activerecord-hackery/ransack/pull/674). *Sibevin Wang*
602
- * Danish (`da.yml`). PR
603
- [#663](https://github.com/activerecord-hackery/ransack/pull/663). *Kasper Johansen*
604
- * Brazilian Portuguese (`pt-BR.yml`). PR
605
- [#581](https://github.com/activerecord-hackery/ransack/pull/581). *Diego Henrique Domingues*
606
- * Indonesian (Bahasa) (`id.yml`). PR
607
- [#612](https://github.com/activerecord-hackery/ransack/pull/612). *Adam Pahlevi Baihaqi*
608
- * Japanese (`ja.yml`). PR
609
- [#622](https://github.com/activerecord-hackery/ransack/pull/622). *Masanobu Mizutani*
610
-
611
- ### Fixed
612
-
613
- * In `FormHelper::SortLink#parameters_hash`, convert `params#to_unsafe_h`
614
- only if Rails 5, and add tests. Commit
615
- [14e66ca](https://github.com/activerecord-hackery/ransack/commit/14e66ca).
616
-
617
- *Jon Atack*
618
-
619
- * Respect negative conditions for collection associations and fix Mongoid
620
- compat. PR [#645](https://github.com/activerecord-hackery/ransack/pull/645).
621
-
622
- *Andrew Vit*
623
-
624
- * Ensure conditions differing only by ransacker_args aren't filtered out.
625
- PR [#665](https://github.com/activerecord-hackery/ransack/pull/665).
626
-
627
- *Andrew Porterfield*
628
-
629
- * Fix using aliased attributes in association searches, and add a failing
630
- spec. PR [#602](https://github.com/activerecord-hackery/ransack/pull/602).
631
-
632
- *Marten Schilstra*
633
-
634
- * Replace Active Record `table_exists?` API that was deprecated
635
- [here](https://github.com/rails/rails/commit/152b85f) in Rails 5. Commit
636
- [c9d2297](https://github.com/activerecord-hackery/ransack/commit/c9d2297).
637
-
638
- *Jon Atack*
639
-
640
- * Adapt to changes in Rails 5 where AC::Parameters composes a HWIA instead of
641
- inheriting from Hash starting from Rails commit rails/rails@14a3bd5. Commit
642
- [ceafc05](https://github.com/activerecord-hackery/ransack/commit/ceafc05).
643
-
644
- *Jon Atack*
645
-
646
- * Fix test `#sort_link with hide order indicator set to true` to fail properly
647
- ([4f65b09](https://github.com/activerecord-hackery/ransack/commit/4f65b09)).
648
- This spec, added in
649
- [#473](https://github.com/activerecord-hackery/ransack/pull/473), tested
650
- the presence of the attribute name instead of the absence of the order
651
- indicators and did not fail when it should.
652
-
653
- *Josh Hunter*, *Jon Atack*
654
-
655
- * Fix rspec-mocks `stub` deprecation warnings when running the tests. Commit
656
- [600892e](https://github.com/activerecord-hackery/ransack/commit/600892e).
657
-
658
- *Jon Atack*
659
-
660
- * Revert
661
- [f858dd6](https://github.com/activerecord-hackery/ransack/commit/f858dd6).
662
- Fixes [#553](https://github.com/activerecord-hackery/ransack/issues/553)
663
- performance regression with the SQL Server adapter.
664
-
665
- *sschwing3*
666
-
667
- * Fix invalid Chinese I18n locale file name by replacing "zh" with "zh-CN".
668
- PR [#590](https://github.com/activerecord-hackery/ransack/pull/590).
669
-
670
- *Ethan Yang*
671
-
672
- ### Changed
673
-
674
- * Memory/speed perf improvement: Freeze strings in array global constants and
675
- partially move from using global string constants to frozen strings
676
- ([381a83c](https://github.com/activerecord-hackery/ransack/commit/381a83c)
677
- and
678
- [ce114ec](https://github.com/activerecord-hackery/ransack/commit/ce114ec)).
679
-
680
- *Jon Atack*
681
-
682
- * Escape underscore `_` wildcard characters with PostgreSQL and MySQL. PR
683
- [#584](https://github.com/activerecord-hackery/ransack/issues/584).
684
-
685
- *Igor Dobryn*
686
-
687
- * Refactor `Ransack::Adapters` from conditionals to classes
688
- ([94a404c](https://github.com/activerecord-hackery/ransack/commit/94a404c)).
689
-
690
- *Jon Atack*
691
-
692
- ## Version 1.7.0 - 2015-08-20
693
- ### Added
694
-
695
- * Add Mongoid support for referenced/embedded relations. PR
696
- [#498](https://github.com/activerecord-hackery/ransack/pull/498).
697
- TODO: Missing spec coverage! Add documentation!
698
-
699
- *Penn Su*
700
-
701
- * Add German i18n locale file (`de.yml`). PR
702
- [#537](https://github.com/activerecord-hackery/ransack/pull/537).
703
-
704
- *Philipp Weissensteiner*
705
-
706
- ### Fixed
707
-
708
- * Fix
709
- [#499](https://github.com/activerecord-hackery/ransack/issues/499) and
710
- [#549](https://github.com/activerecord-hackery/ransack/issues/549).
711
- Ransack now loads only Active Record if both Active Record and Mongoid are
712
- running to avoid the two adapters overriding each other. This clarifies
713
- that Ransack currently knows how to work with only one database adapter
714
- active at a time. PR
715
- [#541](https://github.com/activerecord-hackery/ransack/pull/541).
716
-
717
- *ASnow (Большов Андрей)*
718
-
719
- * Fix [#299](https://github.com/activerecord-hackery/ransack/issues/299)
720
- `attribute_method?` parsing for attribute names containing `_and_`
721
- and `_or_`. Attributes named like `foo_and_bar` or `foo_or_bar` are
722
- recognized now instead of running failing checks for `foo` and `bar`.
723
- PR [#562](https://github.com/activerecord-hackery/ransack/pull/562).
724
-
725
- *Ryohei Hoshi*
726
-
727
- * Fix a time-dependent test failure. When the database has
728
- `default_timezone = :local` (system time) and the `Time.zone` is set to
729
- elsewhere, then `Date.current` does not match what the query produces for
730
- the stored timestamps. Resolved by setting everything to UTC. PR
731
- [#561](https://github.com/activerecord-hackery/ransack/pull/561).
732
-
733
- *Andrew Vit*
734
-
735
- * Avoid overwriting association conditions with default scope in Rails 3.
736
- When a model with default scope was associated with conditions
737
- (`has_many :x, conditions: ...`), the default scope would overwrite the
738
- association conditions. This patch ensures that both sources of conditions
739
- are applied. Avoid selecting records from joins that would normally be
740
- filtered out if they were selected from the base table. Only applies to
741
- Rails 3, as this issue was fixed since Rails 4. PR
742
- [#560](https://github.com/activerecord-hackery/ransack/pull/560).
743
-
744
- *Andrew Vit*
745
-
746
- * Fix RSpec `its` method deprecation warning: "Use of rspec-core's its
747
- method is deprecated. Use the rspec-its gem instead"
748
- ([c09aa17](https://github.com/activerecord-hackery/ransack/commit/c09aa17)).
749
-
750
- * Fix deprecated RSpec syntax in `grouping_spec.rb`
751
- ([ba92a0b](https://github.com/activerecord-hackery/ransack/commit/ba92a0b)).
752
-
753
- *Jon Atack*
754
-
755
- ### Changed
756
-
757
- * Upgrade gemspec dependencies: MySQL2 from '0.3.14' to '0.3.18', and RSpec
758
- from '~> 2.14.0' to '~> 2' which loads 2.99
759
- ([000cd22](https://github.com/activerecord-hackery/ransack/commit/000cd22)).
760
-
761
- * Upgrade spec suite to RSpec 3 `expect` syntax backward compatible with
762
- RSpec 2.9
763
- ([87cd36d](https://github.com/activerecord-hackery/ransack/commit/87cd36d)
764
- and
765
- [d296caa](https://github.com/activerecord-hackery/ransack/commit/d296caa)).
766
-
767
- * Various FormHelper refactorings
768
- ([17dd97a](https://github.com/activerecord-hackery/ransack/commit/17dd97a)
769
- and
770
- [29a73b9](https://github.com/activerecord-hackery/ransack/commit/29a73b9)).
771
-
772
- * Various documentation updates.
773
-
774
- *Jon Atack*
775
-
776
-
777
- ## Version 1.6.6 - 2015-04-05
778
- ### Added
779
-
780
- * Add the Ruby version to the the header message that shows the database,
781
- Active Record and Arel versions when running tests.
782
-
783
- * Add Code Climate analysis.
784
-
785
- *Jon Atack*
786
-
787
- ### Fixed
788
-
789
- * An improved fix for the "undefined method `model_name` for Ransack::Search"
790
- issue [#518](https://github.com/activerecord-hackery/ransack/issues/518)
791
- affecting Rails 4.2.1 and 5.0.0. This fix allows us to remove the
792
- ActionView patch in Ransack version 1.6.4.
793
-
794
- *Gleb Mazovetskiy*
795
-
796
- * Fix an erroneous reference in `ActiveRecord::Associations::JoinDependency`
797
- to a version-dependent Active Record reference, and replace it with a
798
- better, more reliable one defined in Polyamorous. As this class lives
799
- inside an `ActiveRecord` module, the reference needs to be absolute in
800
- order to properly point to the AR class.
801
-
802
- *Nahuel Cuesta Luengo*
803
-
804
- * Fix RubyGems YARD rendering of the README docs.
805
-
806
- *Jon Atack*
807
-
808
- ### Changed
809
-
810
- * Upgrade Polyamorous dependency to version 1.2.0, which uses `Module#prepend`
811
- instead of `alias_method` for hooking into Active Record (with Ruby 2.x).
812
-
813
- *Jon Atack*
814
-
815
-
816
- ## Version 1.6.5 - 2015-03-28 - Rails 5.0.0 update
817
- ### Added
818
-
819
- * [WIP/experimental] Add compatibility with Rails 5/master and Arel 7.
820
-
821
- * Update the [Contributing Guide](CONTRIBUTING.md) with detailed steps for
822
- contributing to Ransack.
823
-
824
- * Broaden the test suite database options in `schema.rb` and add
825
- code documentation.
826
-
827
- * Improve the header message when running tests.
828
-
829
- *Jon Atack*
830
-
831
- * Allow `:wants_array` to be set to `false` in the predicate options
832
- ([#32](https://github.com/activerecord-hackery/ransack/issues/32)).
833
-
834
- *Michael Pavling*
835
-
836
- * Add a failing spec for issue
837
- [#374](https://github.com/activerecord-hackery/ransack/issues/374).
838
-
839
- *Jamie Davidson*, *Jon Atack*
840
-
841
- ### Fixed
842
-
843
- * Stop relying on `Active Record::relation#where_values` which are deprecated
844
- in Rails 5.
845
-
846
- * Make the test for passing search arguments to a ransacker
847
- (`ransacker_args`) work correctly with Sqlite3.
848
-
849
- *Jon Atack*
850
-
851
- ### Changed
852
-
853
- * Stop CI testing for Rails 3.0 to reduce the size of the Travis test matrix.
854
-
855
- *Jon Atack*
856
-
857
-
858
- ## Version 1.6.4 - 2015-03-20 - Rails 4.2.1 update
859
-
860
- * ActionView patch to maintain compatibility with Rails 4.2.1 released today.
861
-
862
- *Jon Atack*
863
-
864
- * Enable scoping I18n by 'ransack.models'
865
- ([#514](https://github.com/activerecord-hackery/ransack/pull/514)).
866
-
867
- *nagyt234*
868
-
869
- * Add ransacker arguments
870
- ([#513](https://github.com/activerecord-hackery/ransack/pull/513)).
871
-
872
- *Denis Tataurov*, *Jon Atack*
873
-
874
-
875
- ## Version 1.6.3 - 2015-01-21
876
-
877
- * Fix a regression
878
- ([#496](https://github.com/activerecord-hackery/ransack/issues/496)) caused
879
- by [ee571fe](https://github.com/activerecord-hackery/ransack/commit/ee571fe)
880
- where passing a multi-parameter attribute (like `date_select`) raised
881
- `RuntimeError: can't add a new key into hash during iteration`, and add a
882
- regression spec for the issue.
883
-
884
- *Nate Berkopec*, *Jon Atack*
885
-
886
- * Update travis-ci to no longer test Rails 3.1 with Ruby 2.2 and speed up the test matrix.
887
-
888
- * Refactor Nodes::Condition.
889
-
890
- *Jon Atack*
891
-
892
-
893
- ## Version 1.6.2 - 2015-01-14
894
-
895
- * Fix a regression
896
- ([#494](https://github.com/activerecord-hackery/ransack/issues/494))
897
- where passing an array of routes to `search_form_for` no longer worked,
898
- and add a failing/passing test that would have caught the issue.
899
-
900
- *Daniel Rikowski*, *Jon Atack*
901
-
902
-
903
- ## Version 1.6.1 - 2015-01-14
904
-
905
- * Fix a regression with using `in` predicates caused by PR [#488](https://github.com/activerecord-hackery/ransack/pull/488)) and add a test.
906
-
907
- * README improvements to clarify `sort_link` syntax with associations and
908
- Ransack#search vs #ransack.
909
-
910
- * Default the Gemfile to Rails 4-2-stable.
911
-
912
- *Jon Atack*
913
-
914
-
915
- ## Version 1.6.0 - 2015-01-12
916
- ### Added
917
-
918
- * Add support for using Ransack with `Mongoid 4.0` without associations
919
- ([PR #407](https://github.com/activerecord-hackery/ransack/pull/407)).
920
-
921
- *Zhomart Mukhamejanov*
922
-
923
- * Add support and tests for passing stringy booleans for ransackable scopes
924
- ([PR #460](https://github.com/activerecord-hackery/ransack/pull/460)).
925
-
926
- *Josh Kovach*
927
-
928
- * Add an sort_link option to not display sort order indicator arrows
929
- ([PR #473](https://github.com/activerecord-hackery/ransack/pull/473)).
930
-
931
- *Fred Bergman*
932
-
933
- * Numerous documentation improvements to the README, Contributing Guide and
934
- wiki.
935
-
936
- *Jon Atack*
937
-
938
- ### Fixed
939
-
940
- * Fix passing arrays to ransackers with Rails 4.2 / Arel 6.0 (pull requests
941
- [#486](https://github.com/activerecord-hackery/ransack/pull/486) and
942
- [#488](https://github.com/activerecord-hackery/ransack/pull/488)).
943
-
944
- *Idean Labib*
945
-
946
- * Make `search_form_for`'s default `:as` option respect the custom search key
947
- if it has been set
948
- ([PR #470](https://github.com/activerecord-hackery/ransack/pull/470)).
949
- Prior to this change, if you set a custom `search_key` option in the
950
- Ransack initializer file, you'd have to also pass an `as: :whatever` option
951
- to all of the search forms. Fixes
952
- [#92](https://github.com/activerecord-hackery/ransack/issues/92).
953
-
954
- *Robert Speicher*
955
-
956
- * Fix sorting on polymorphic associations (missing downcase)
957
- ([PR #467](https://github.com/activerecord-hackery/ransack/pull/467)).
958
-
959
- *Eugen Neagoe*
960
-
961
- * Fix Rails 5 / Arel 5 compatibility after the Arel and Active Record API
962
- changed.
963
-
964
- * Fix and add tests for sort_link `default_order` parsing if the option is set
965
- as a string instead of symbol.
966
-
967
- * Fix and add a test to handle `nil` in options passed to sort_link.
968
-
969
- * Fix #search method name conflicts in the README.
970
-
971
- *Jon Atack*
972
-
973
- ### Changed
974
-
975
- * Refactor and DRY up FormHelper#SortLink. Encapsulate parsing into a
976
- Plain Old Ruby Object with few public methods and small, private functional
977
- methods. Limit mutations to explicit methods and mutate no ivars.
978
-
979
- * Numerous speed improvements by using more specific Ruby methods like:
980
- - `Hash#each_key` instead of `Hash#keys.each`
981
- - `#none?` instead of `select#empty?`
982
- - `#any?` instead of `#select` followed by `#any?`
983
- - `#flat_map` instead of `#flatten` followed by `#map`
984
- - `!include?` instead of `#none?`
985
-
986
- * Replace `string#freeze` instances with top level constants to reduce string
987
- allocations in Ruby < 2.1.
988
-
989
- * Remove unneeded `Ransack::` namespacing on most of the constants.
990
-
991
- * In enumerable methods, pass a symbol as an argument instead of a block.
992
-
993
- * Update Travis-ci for Rails 5.0.0 and 4-2-stable.
994
-
995
- * Update the Travis-ci tests and the Gemfile for Ruby 2.2.
996
-
997
- * Replace `#search` with `#ransack` class methods in the README and wiki
998
- code examples. Enabling the `#search` alias by default may possibly be
999
- deprecated in the next major release (Ransack v.2.0.0) to address
1000
- [#369](https://github.com/activerecord-hackery/ransack/issues/369).
1001
-
1002
- *Jon Atack*
1003
-
1004
-
1005
- ## Version 1.5.1 - 2014-10-30
1006
- ### Added
1007
-
1008
- * Add base specs for search on fields with `_start` and `_end`.
1009
-
1010
- * Add a failing spec for detecting attribute fields containing `_and_` that
1011
- needs to be fixed. Attribute names containing `_and_` and `_or_` are still
1012
- not parsed/detected correctly.
1013
-
1014
- *Jon Atack*
1015
-
1016
- ### Fixed
1017
-
1018
- * Fix a regression caused by incorrect string constants in `context.rb`.
1019
-
1020
- *Kazuhiro Nishiyama*
1021
-
1022
- ### Changed
1023
-
1024
- * Remove duplicate code in `spec/support/schema.rb`.
1025
-
1026
- *Jon Atack*
1027
-
1028
-
1029
- ## Version 1.5.0 - 2014-10-26
1030
- ### Added
1031
-
1032
- * Add support for multiple sort fields and default orders in Ransack
1033
- `sort_link` helpers
1034
- ([PR #438](https://github.com/activerecord-hackery/ransack/pull/438)).
1035
-
1036
- *Caleb Land*, *James u007*
1037
-
1038
- * Add tests for `lteq`, `lt`, `gteq` and `gt` predicates. They are also
1039
- tested in Arel, but testing them in Ransack has proven useful to detect
1040
- issues.
1041
-
1042
- *Jon Atack*
1043
-
1044
- * Add tests for unknown attribute names.
1045
-
1046
- *Joe Yates*
1047
-
1048
- * Add tests for attribute names containing `_or_` and `_and_`.
1049
-
1050
- *Joe Yates*, *Jon Atack*
1051
-
1052
- * Add tests for attribute names ending with `_start` and `_end``.
1053
-
1054
- *Jon Atack*, *Timo Schilling*
1055
-
1056
- * Add tests for `start`, `not_start`, `end` and `not_end` predicates, with
1057
- emphasis on cases when attribute names end with `_start` and `_end`.
1058
-
1059
- *Jon Atack*
1060
-
1061
- ### Fixed
1062
-
1063
- * Fix a regression where form labels for attributes through a `belongs_to`
1064
- association without a translation for the attribute in the locales file
1065
- would cause a "no implicit conversion of nil into Hash" crash instead of
1066
- falling back on the attribute name. Added test coverage.
1067
-
1068
- *John Dell*, *Jon Atack*, *jasdeepgosal*
1069
-
1070
- * Fix the `form_helper date_select` spec that was failing with Rails 4.2 and
1071
- master.
1072
-
1073
- *Jon Atack*
1074
-
1075
- * Improve `attribute_method?` parsing for attribute names containing `_and_`
1076
- and `_or_`. Attributes named like `foo_and_bar` or `foo_or_bar` are
1077
- recognized now instead of running failing checks for `foo` and `bar`.
1078
- CORRECTION October 28, 2014: this feature is still not working!
1079
-
1080
- *Joe Yates*
1081
-
1082
- * Improve `attribute_method?` parsing for attribute names ending with a
1083
- predicate like `_start` and `_end`. For instance, a `foo_start` attribute
1084
- is now recognized instead of raising a NoMethodError.
1085
-
1086
- *Timo Schilling*, *Jon Atack*
1087
-
1088
- ### Changed
1089
-
1090
- * Reduce object allocations and memory footprint (with a slight speed gain as
1091
- well) by extracting commonly used strings into top level constants and
1092
- replacing calls to `#try` methods with simple nil checking.
1093
-
1094
- *Jon Atack*
1095
-
1096
-
1097
- ## Version 1.4.1 - 2014-09-23
1098
-
1099
- * Fix README markdown so RubyGems documentation picks up the formatting correctly.
1100
-
1101
- *Jon Atack*
1102
-
1103
-
1104
- ## Version 1.4.0 - 2014-09-23
1105
- ### Added
1106
-
1107
- * Add support for Rails 4.2.0! Let us know if you encounter any issues.
1108
-
1109
- *Xiang Li*
1110
-
1111
- * Add `not_true` and `not_false` predicates and update the "Basic Searching"
1112
- wiki. Fixes #123, #353.
1113
-
1114
- *Pedro Chambino*
1115
-
1116
- * Add Romanian i18n locale file (`ro.yml`).
1117
-
1118
- *Andreas Philippi*
1119
-
1120
- * Add new documentation in the README explaining how to group queries by `OR`
1121
- instead of the default `AND` using the `m: 'or'` combinator.
1122
-
1123
- * Add new documentation in the README and in the source code comments
1124
- explaining in detail how to handle whitelisting/authorization of
1125
- attributes, associations, sorts and scopes.
1126
-
1127
- * Add new documentation in the README explaining in more detail how to use
1128
- scopes for searching with Ransack.
1129
-
1130
- * Begin a CHANGELOG.
1131
-
1132
- *Jon Atack*
1133
-
1134
- ### Fixed
1135
-
1136
- * Fix singular/plural Active Record attribute translations.
1137
-
1138
- *Andreas Philippi*
1139
-
1140
- * Fix the params hash being modified by `Search.new` and the Ransack scope.
1141
-
1142
- *Daniel Rikowski*
1143
-
1144
- * Apply default scope conditions for association joins (fix for Rails 3).
1145
-
1146
- Avoid selecting records from joins that would normally be filtered out
1147
- if they were selected from the base table. Only applies to Rails 3, as
1148
- this issue was fixed in Rails 4.
1149
-
1150
- *Andrew Vit*
1151
-
1152
- * Fix incoherent code examples in the README Associations section that
1153
- sometimes used `@q` and other times `@search`.
1154
-
1155
- *Jon Atack*
1156
-
1157
- ### Changed
1158
-
1159
- * Refactor Ransack::Translate.
1160
-
1161
- * Rewrite much of the Ransack README documentation, including the
1162
- Associations section code examples and the Authorizations section detailing
1163
- how to whitelist attributes, associations, sorts and scopes.
1164
-
1165
- *Jon Atack*
1166
-
1167
-
1168
- ## Version 1.3.0 - 2014-08-23
1169
- ### Added
1170
-
1171
- * Add search scopes by popular demand. Using `ransackable_scopes`, users can
1172
- define whitelists for allowed model scopes on a parent table. Not yet
1173
- implemented for associated models' scopes; scopes must be defined on the
1174
- parent table.
1175
-
1176
- *Gleb Mazovetskiy*, *Andrew Vit*, *Sven Schwyn*
1177
-
1178
- * Add `JOINS` merging.
1179
-
1180
- * Add `OR` grouping on base search.
1181
-
1182
- * Allow authorizing/whitelisting attributes, associations, sorts and scopes.
1183
-
1184
- * Improve boolean predicates’ handling of `false` values.
1185
-
1186
- * Allow configuring Ransack to raise on instead of ignore unknown search
1187
- conditions.
1188
-
1189
- * Allow passing blank values to search without crashing.
1190
-
1191
- * Add wildcard escaping compatibility for SQL Server databases.
1192
-
1193
- * Add various I18n translations.