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