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