ransack 1.7.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +2 -0
  3. data/.travis.yml +16 -48
  4. data/CHANGELOG.md +409 -26
  5. data/CONTRIBUTING.md +48 -20
  6. data/Gemfile +9 -13
  7. data/README.md +352 -92
  8. data/Rakefile +6 -25
  9. data/lib/polyamorous/activerecord_5.0_ruby_2/join_association.rb +2 -0
  10. data/lib/polyamorous/activerecord_5.0_ruby_2/join_dependency.rb +2 -0
  11. data/lib/polyamorous/activerecord_5.1_ruby_2/join_association.rb +32 -0
  12. data/lib/polyamorous/activerecord_5.1_ruby_2/join_dependency.rb +112 -0
  13. data/lib/polyamorous/activerecord_5.2.0_ruby_2/join_association.rb +32 -0
  14. data/lib/polyamorous/activerecord_5.2.0_ruby_2/join_dependency.rb +113 -0
  15. data/lib/polyamorous/activerecord_5.2.1_ruby_2/join_association.rb +31 -0
  16. data/lib/polyamorous/activerecord_5.2.1_ruby_2/join_dependency.rb +57 -0
  17. data/lib/polyamorous/join.rb +70 -0
  18. data/lib/polyamorous/swapping_reflection_class.rb +11 -0
  19. data/lib/polyamorous/tree_node.rb +7 -0
  20. data/lib/polyamorous.rb +25 -0
  21. data/lib/ransack/adapters/active_record/base.rb +23 -2
  22. data/lib/ransack/adapters/active_record/context.rb +210 -135
  23. data/lib/ransack/adapters/active_record/ransack/constants.rb +53 -53
  24. data/lib/ransack/adapters/active_record/ransack/context.rb +11 -15
  25. data/lib/ransack/adapters/active_record/ransack/nodes/condition.rb +33 -30
  26. data/lib/ransack/adapters/active_record/ransack/translate.rb +1 -5
  27. data/lib/ransack/adapters/active_record/ransack/visitor.rb +23 -0
  28. data/lib/ransack/adapters/active_record.rb +11 -10
  29. data/lib/ransack/adapters.rb +45 -23
  30. data/lib/ransack/configuration.rb +91 -4
  31. data/lib/ransack/constants.rb +14 -26
  32. data/lib/ransack/context.rb +29 -18
  33. data/lib/ransack/helpers/form_builder.rb +27 -12
  34. data/lib/ransack/helpers/form_helper.rb +75 -70
  35. data/lib/ransack/locale/ar.yml +70 -0
  36. data/lib/ransack/locale/az.yml +70 -0
  37. data/lib/ransack/locale/bg.yml +70 -0
  38. data/lib/ransack/locale/da.yml +70 -0
  39. data/lib/ransack/locale/el.yml +70 -0
  40. data/lib/ransack/locale/id.yml +70 -0
  41. data/lib/ransack/locale/it.yml +70 -0
  42. data/lib/ransack/locale/ja.yml +70 -0
  43. data/lib/ransack/locale/nl.yml +4 -4
  44. data/lib/ransack/locale/pt-BR.yml +70 -0
  45. data/lib/ransack/locale/ru.yml +70 -0
  46. data/lib/ransack/locale/tr.yml +70 -0
  47. data/lib/ransack/locale/{zh.yml → zh-CN.yml} +13 -13
  48. data/lib/ransack/locale/zh-TW.yml +70 -0
  49. data/lib/ransack/nodes/attribute.rb +5 -2
  50. data/lib/ransack/nodes/bindable.rb +18 -6
  51. data/lib/ransack/nodes/condition.rb +77 -28
  52. data/lib/ransack/nodes/grouping.rb +16 -10
  53. data/lib/ransack/nodes/sort.rb +9 -5
  54. data/lib/ransack/nodes/value.rb +74 -68
  55. data/lib/ransack/nodes.rb +1 -1
  56. data/lib/ransack/predicate.rb +15 -19
  57. data/lib/ransack/search.rb +14 -7
  58. data/lib/ransack/translate.rb +3 -3
  59. data/lib/ransack/version.rb +1 -1
  60. data/lib/ransack/visitor.rb +1 -12
  61. data/lib/ransack.rb +7 -7
  62. data/logo/ransack-h.png +0 -0
  63. data/logo/ransack-h.svg +34 -0
  64. data/logo/ransack-v.png +0 -0
  65. data/logo/ransack-v.svg +34 -0
  66. data/logo/ransack.png +0 -0
  67. data/logo/ransack.svg +21 -0
  68. data/ransack.gemspec +9 -10
  69. data/spec/console.rb +4 -0
  70. data/spec/helpers/polyamorous_helper.rb +24 -0
  71. data/spec/ransack/adapters/active_record/base_spec.rb +365 -74
  72. data/spec/ransack/adapters/active_record/context_spec.rb +14 -19
  73. data/spec/ransack/configuration_spec.rb +87 -14
  74. data/spec/ransack/helpers/form_builder_spec.rb +2 -11
  75. data/spec/ransack/helpers/form_helper_spec.rb +481 -113
  76. data/spec/ransack/join_association_spec.rb +28 -0
  77. data/spec/ransack/join_dependency_spec.rb +86 -0
  78. data/spec/ransack/join_spec.rb +19 -0
  79. data/spec/ransack/nodes/condition_spec.rb +24 -0
  80. data/spec/ransack/nodes/grouping_spec.rb +56 -0
  81. data/spec/ransack/predicate_spec.rb +27 -5
  82. data/spec/ransack/search_spec.rb +84 -70
  83. data/spec/spec_helper.rb +4 -0
  84. data/spec/support/schema.rb +86 -41
  85. metadata +60 -81
  86. data/lib/ransack/adapters/active_record/3.0/compat.rb +0 -179
  87. data/lib/ransack/adapters/active_record/3.0/context.rb +0 -201
  88. data/lib/ransack/adapters/active_record/3.1/context.rb +0 -215
  89. data/lib/ransack/adapters/active_record/3.2/context.rb +0 -44
  90. data/lib/ransack/adapters/active_record/compat.rb +0 -14
  91. data/lib/ransack/adapters/mongoid/3.2/.gitkeep +0 -0
  92. data/lib/ransack/adapters/mongoid/attributes/attribute.rb +0 -37
  93. data/lib/ransack/adapters/mongoid/attributes/order_predications.rb +0 -17
  94. data/lib/ransack/adapters/mongoid/attributes/predications.rb +0 -141
  95. data/lib/ransack/adapters/mongoid/base.rb +0 -130
  96. data/lib/ransack/adapters/mongoid/context.rb +0 -208
  97. data/lib/ransack/adapters/mongoid/inquiry_hash.rb +0 -23
  98. data/lib/ransack/adapters/mongoid/ransack/constants.rb +0 -88
  99. data/lib/ransack/adapters/mongoid/ransack/context.rb +0 -60
  100. data/lib/ransack/adapters/mongoid/ransack/nodes/condition.rb +0 -27
  101. data/lib/ransack/adapters/mongoid/ransack/translate.rb +0 -13
  102. data/lib/ransack/adapters/mongoid/ransack/visitor.rb +0 -24
  103. data/lib/ransack/adapters/mongoid/table.rb +0 -35
  104. data/lib/ransack/adapters/mongoid.rb +0 -13
  105. data/spec/mongoid/adapters/mongoid/base_spec.rb +0 -276
  106. data/spec/mongoid/adapters/mongoid/context_spec.rb +0 -56
  107. data/spec/mongoid/configuration_spec.rb +0 -102
  108. data/spec/mongoid/dependencies_spec.rb +0 -8
  109. data/spec/mongoid/helpers/ransack_helper.rb +0 -11
  110. data/spec/mongoid/nodes/condition_spec.rb +0 -34
  111. data/spec/mongoid/nodes/grouping_spec.rb +0 -13
  112. data/spec/mongoid/predicate_spec.rb +0 -155
  113. data/spec/mongoid/search_spec.rb +0 -446
  114. data/spec/mongoid/support/mongoid.yml +0 -6
  115. data/spec/mongoid/support/schema.rb +0 -128
  116. data/spec/mongoid/translate_spec.rb +0 -14
  117. data/spec/mongoid_spec_helper.rb +0 -59
  118. data/spec/ransack/dependencies_spec.rb +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 1a62534d07f2b79f6ac71228f7b8884c2f97891f
4
- data.tar.gz: 983a58938313d8b5ded1e13ff182f0ee1c27ee48
2
+ SHA256:
3
+ metadata.gz: c2eab955e89328399bcb163a575725ea51969653edb1edd66773b6f60554fd12
4
+ data.tar.gz: 1e6d34f5d87238a18c7ae2194cd0d5320d9460b97b8d8c30ec79d82de6aa139a
5
5
  SHA512:
6
- metadata.gz: eb11af400660331859ddeeb11819d14849fd398ffe3b00368c860ee47baeeace67cb29116d15b46dcad92f1466bb19d6f9e85070baea384ef49500ad1aa1e3a1
7
- data.tar.gz: 5ed69b32c4bd6a65b60e8dd2cccb5c634738b8fe3a3a7266ccc5c6a67ab2b720b016afbfcd8e7740c0ed76dea0c00d46db0c8a61b545b7e7ff66d324bd1057d3
6
+ metadata.gz: 52c4a46725d9bb474fbb229c39d9638c730d77bd53211f00f639b78690fcd72aaaa2418b56704c30024c36c39ca7cebde0e86b76cba13704a26f4416791ad141
7
+ data.tar.gz: bd6880992a977511ea37df47d0828e8ee1e855dff39e2620eaed89bc043ffde2960e3006ebcc0609c9738af10faea6947a1db1f91f1f3eebc65b631d97137054
data/.gitignore CHANGED
@@ -2,3 +2,5 @@
2
2
  .bundle
3
3
  Gemfile.lock
4
4
  pkg/*
5
+ coverage/*
6
+ .DS_Store
data/.travis.yml CHANGED
@@ -1,64 +1,32 @@
1
- services: mongodb
2
-
3
1
  language: ruby
4
2
 
5
3
  sudo: false
6
4
 
7
5
  rvm:
8
- - 2.2.3
9
- - 2.1
10
- - 2.0
11
- - 1.9
6
+ - 2.5
12
7
 
13
8
  env:
14
- - RAILS=4-2-stable DB=mongodb
15
- - RAILS=4-2-stable DB=sqlite3
16
- - RAILS=4-2-stable DB=mysql
17
- - RAILS=4-2-stable DB=postgres
18
-
19
- - RAILS=4-1-stable DB=mongodb
20
- - RAILS=4-1-stable DB=sqlite3
21
- - RAILS=4-1-stable DB=mysql
22
- - RAILS=4-1-stable DB=postgres
9
+ - RAILS=5-2-stable DB=sqlite3
10
+ - RAILS=5-2-stable DB=mysql
11
+ - RAILS=5-2-stable DB=postgres
23
12
 
24
- - RAILS=4-0-stable DB=sqlite3
25
- - RAILS=4-0-stable DB=mysql
26
- - RAILS=4-0-stable DB=postgres
13
+ - RAILS=v5.2.1 DB=sqlite3
14
+ - RAILS=v5.2.1 DB=mysql
15
+ - RAILS=v5.2.1 DB=postgres
27
16
 
28
- - RAILS=3-2-stable DB=sqlite
29
- - RAILS=3-2-stable DB=mysql
30
- - RAILS=3-2-stable DB=postgres
17
+ - RAILS=v5.2.0 DB=sqlite3
18
+ - RAILS=v5.2.0 DB=mysql
19
+ - RAILS=v5.2.0 DB=postgres
31
20
 
32
- - RAILS=3-1-stable DB=sqlite
33
- - RAILS=3-1-stable DB=mysql
34
- - RAILS=3-1-stable DB=postgres
21
+ - RAILS=5-1-stable DB=sqlite3
22
+ - RAILS=5-1-stable DB=mysql
23
+ - RAILS=5-1-stable DB=postgres
35
24
 
36
25
  matrix:
37
- include:
38
- - rvm: 2.2.3
39
- env: RAILS=master DB=sqlite3
40
- - rvm: 2.2.3
41
- env: RAILS=master DB=mysql
42
- - rvm: 2.2.3
43
- env: RAILS=master DB=postgres
44
- exclude:
45
- - rvm: 2.2.3
46
- env: RAILS=3-1-stable DB=sqlite
47
- - rvm: 2.2.3
48
- env: RAILS=3-1-stable DB=mysql
49
- - rvm: 2.2.3
50
- env: RAILS=3-1-stable DB=postgres
51
26
  allow_failures:
52
- - env: RAILS=master DB=sqlite3
53
- - env: RAILS=master DB=mysql
54
- - env: RAILS=master DB=postgres
55
- - rvm: 2.2.3
56
- env: RAILS=3-2-stable DB=sqlite
57
- - rvm: 2.2.3
58
- env: RAILS=3-2-stable DB=mysql
59
- - rvm: 2.2.3
60
- env: RAILS=3-2-stable DB=postgres
61
-
27
+ - env: RAILS=5-2-stable DB=sqlite3
28
+ - env: RAILS=5-2-stable DB=mysql
29
+ - env: RAILS=5-2-stable DB=postgres
62
30
  before_script:
63
31
  - mysql -e 'create database ransack collate utf8_general_ci;'
64
32
  - mysql -e 'use ransack;show variables like "%character%";show variables like "%collation%";'
data/CHANGELOG.md CHANGED
@@ -2,8 +2,404 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## Version 2.1.1 - 2018-12-05
6
+
7
+ * Add `arabic` translation
8
+ https://github.com/activerecord-hackery/ransack/pull/979
9
+
10
+ * Deprecate #search
11
+ PR [975](https://github.com/activerecord-hackery/ransack/pull/975)
12
+
13
+ ## Version 2.1.0 - 2018-10-26
14
+
15
+ * Add support for sorting by scopes
16
+ PR [973](https://github.com/activerecord-hackery/ransack/pull/973)
17
+
18
+ *Diego Borges*
19
+
20
+ * Added a new logo for Ransack
21
+ PR [972](https://github.com/activerecord-hackery/ransack/pull/972)
22
+
23
+ *Anıl Kılıç*, *Greg Molnar*
24
+
25
+ * Greek translations
26
+ PR [971](https://github.com/activerecord-hackery/ransack/pull/971)
27
+ PR [960](https://github.com/activerecord-hackery/ransack/pull/960)
28
+
29
+ *Sean Carroll*, *Greg Molnar*
30
+
31
+ * README improvements
32
+ PR [963](https://github.com/activerecord-hackery/ransack/pull/963)
33
+
34
+ *tommaso1*
35
+
36
+ * Bulgarian translations
37
+ PR [961](https://github.com/activerecord-hackery/ransack/pull/961)
38
+
39
+ *Sean Carroll*
40
+
41
+ * README improvements
42
+ PR [956](https://github.com/activerecord-hackery/ransack/pull/956)
43
+
44
+ *Alex Konoval*
45
+
46
+ * Remove lib/ransack/adapters/active_record/compat.rb
47
+ PR [954](https://github.com/activerecord-hackery/ransack/pull/954)
48
+
49
+ *Ryuta Kamizono*
50
+
51
+ * Remove unused aliases
52
+ PR [953](https://github.com/activerecord-hackery/ransack/pull/953)
53
+
54
+ *Ryuta Kamizono*
55
+
56
+ ## Version 2.0.1 - 2018-08-18
57
+
58
+ * Don't return association if table is nil
59
+ PR [952](https://github.com/activerecord-hackery/ransack/pull/952)
60
+
61
+ *Christian Gregg*
62
+
63
+ ## Version 2.0.0 - 2018-08-09
64
+
65
+ * Add support for Active Record 5.2.1
66
+ PR [#938](https://github.com/activerecord-hackery/ransack/pull/938)
67
+
68
+ * Fix sort with joins on existing association
69
+ PR [#937](https://github.com/activerecord-hackery/ransack/pull/937)
70
+
71
+ * Add the ability to skip arg sanitization on a per scope basis. Using
72
+ `ransackable_scopes_skip_sanitize_args`, users can define a list of
73
+ scopes which will bypass parameter sanitization. This allows passing 0,
74
+ 1, t, f, etc. to a scope as an actual parameter.
75
+ PR [#933](https://github.com/activerecord-hackery/ransack/pull/933)
76
+
77
+ * Drop support for Active Record < 5.0.
78
+ PR [#929](https://github.com/activerecord-hackery/ransack/pull/929)
79
+
80
+ * Extract mongoid support to a separate gem.
81
+ PR [#928](https://github.com/activerecord-hackery/ransack/pull/928)
82
+
83
+ * Absorb polyamorous
84
+ PR [#927](https://github.com/activerecord-hackery/ransack/pull/927)
85
+
86
+ * Fix broken monkey patch of #form_with
87
+ PR [#922](https://github.com/activerecord-hackery/ransack/pull/922)
88
+
89
+ ## Version 1.8.8 - 2018-03-16
90
+ * Fix multiple database support
91
+ PR [#893](https://github.com/activerecord-hackery/ransack/pull/893)
92
+
93
+ * Updated Dutch translations
94
+ PR [#887](https://github.com/activerecord-hackery/ransack/pull/887)
95
+
96
+ * Fixed no method error 'asc' for Rails 4.2
97
+ PR [#885](https://github.com/activerecord-hackery/ransack/pull/885)
98
+
99
+
100
+ ## Version 1.8.7 - 2018-02-05
101
+
102
+ * Rails 5.2 support
103
+ PR [#868](https://github.com/activerecord-hackery/ransack/pull/868)
104
+
105
+ * Lock pg gem to 0.21 to support older releases
106
+
107
+ * Warnings cleanup
108
+ PR [#867](https://github.com/activerecord-hackery/ransack/pull/867)
109
+
110
+ * Wildcard escaping
111
+ PR [#866]
112
+
113
+ ## Version 1.8.6 - 2018-01-23
114
+
115
+ ### Added
116
+
117
+ * Improve memory usage
118
+ PR [#820](https://github.com/activerecord-hackery/ransack/pull/820)
119
+
120
+ * Bump Polyamorous version to 1.3.2
121
+ PR [#858](https://github.com/activerecord-hackery/ransack/pull/858)
122
+
123
+ ## Version 1.8.5
124
+
125
+ ### Added
126
+
127
+ * Added Turkish Translations
128
+ PR [#835](https://github.com/activerecord-hackery/ransack/issues/835).
129
+
130
+ ## Version 1.8.4 - 2017-10-09
131
+
132
+ ### Added
133
+
134
+ * Added italian translations.
135
+ PR [#833](https://github.com/activerecord-hackery/ransack/pull/833).
136
+
137
+ * Add an optional default arrow for unsorted fields.
138
+ PR [#816](https://github.com/activerecord-hackery/ransack/pull/816/files).
139
+
140
+ ### Fixed
141
+
142
+ * Cast Postgres money type to float.
143
+ PR [#823](https://github.com/activerecord-hackery/ransack/pull/823).
144
+
145
+ * Fix the bug in sort_link, which causes the multiple fields option to be
146
+ ignored when block parameter is specified.
147
+ PR [#818](https://github.com/activerecord-hackery/ransack/pull/818).
148
+
149
+ * No need pass some arugments to JoinAssociation#join_constraints in Rails 5.1.
150
+ PR [#814](https://github.com/activerecord-hackery/ransack/pull/814).
151
+ Fixes [#807](https://github.com/activerecord-hackery/ransack/issues/807).
152
+ Reference [rails/rails#28267](https://github.com/rails/rails/pull/28267)
153
+ and [rails/rails#27851](https://github.com/rails/rails/pull/27851).
154
+
155
+ ## Version 1.8.3 - 2017-06-15
156
+
157
+ ### Added
158
+
159
+ * Add a config option to customize the up and down arrows used for direction
160
+ indicators in Ransack sort links.
161
+ PR [#726](https://github.com/activerecord-hackery/ransack/pull/726).
162
+
163
+ *Garett Arrowood*
164
+
165
+ * Add ability to turn off sanitization of custom scope arguments.
166
+ PR [#742](https://github.com/activerecord-hackery/ransack/pull/742).
167
+
168
+ *Garett Arrowood*
169
+
170
+ ### Fixed
171
+
172
+ * Use class attributes properly so that inheritance is respected.
173
+ PR [#717](https://github.com/activerecord-hackery/ransack/pull/717).
174
+ This fixes two bugs:
175
+
176
+ 1. In the Mongoid adapter, subclasses were not properly inheriting their
177
+ parents' Ransack aliases because each class defined its own set of
178
+ aliases.
179
+
180
+ 2. In the Active Record adapter, Ransack aliases were defined in such a way
181
+ that the parent's (and grandparent's, etc.) aliases were overwritten by
182
+ the child, meaning that all aliases were ultimately kept on
183
+ `ActiveRecord::Base`. This had the unfortunate effect of enforcing
184
+ uniqueness of Ransack alias names across all models rather than per
185
+ model. Depending on the load order of models, earlier definitions of an
186
+ alias in other models were clobbered.
187
+
188
+ *Steve Richert (laserlemon)*
189
+
190
+ * Use `ActiveSupport.on_load` hooks to include Ransack in Active Record,
191
+ avoiding autoloading the constant too soon. PR
192
+ [#719](https://github.com/activerecord-hackery/ransack/pull/719). Reference:
193
+ [This comment in rails#23589]
194
+ (https://github.com/rails/rails/issues/23589#issuecomment-229247727).
195
+
196
+ *Yuji Yaginuma (y-yagi)*
197
+
198
+ ## Version 1.8.2 - 2016-08-08
199
+ ### Fixed
200
+
201
+ * Fix empty attribute_fields regression in advanced search mode introduced by
202
+ [235eae3](https://github.com/activerecord-hackery/ransack/commit/235eae3).
203
+ Closes
204
+ [#701](https://github.com/activerecord-hackery/ransack/issues/701). Commit
205
+ [2839acf](https://github.com/activerecord-hackery/ransack/commit/2839acf).
206
+
207
+ *Jon Atack, Jay Dorsey, Stefan Haslinger, Igor Kasyanchuk*
208
+
209
+ ### Added
210
+
211
+ * Add `sort_url` view helper that returns only the url of a `sort_link`. PR
212
+ [#706](https://github.com/activerecord-hackery/ransack/pull/706).
213
+
214
+ *amatotsuji*
215
+
216
+ ## Version 1.8.1 - 2016-07-27
217
+ ### Fixed
218
+
219
+ * Fix `rake console` to run a command-line console with ransack + seed data.
220
+ Commits
221
+ [2cc781e](https://github.com/activerecord-hackery/ransack/commit/2cc781e),
222
+ [f2e85ad](https://github.com/activerecord-hackery/ransack/commit/f2e85ad),
223
+ [6a059ba](https://github.com/activerecord-hackery/ransack/commit/6a059ba).
224
+
225
+ *Jon Atack*
226
+
227
+ * Fix returned value of `Ransack::Nodes::Condition#format_predicate`. PR
228
+ [#692](https://github.com/activerecord-hackery/ransack/pull/692).
229
+
230
+ *Masahiro Saito*
231
+
232
+ * Better test coverage on passing arrays to ransackers. Commit
233
+ [98df2c5](https://github.com/activerecord-hackery/ransack/commit/98df2c5).
234
+
235
+ *Jon Atack*
236
+
237
+ * Fix missing Ransack::Constants::ASC constant. Commit
238
+ [aece23c](https://github.com/activerecord-hackery/ransack/commit/aece23c).
239
+
240
+ *Jon Atack*
241
+
242
+ ### Changed
243
+
244
+ * Replace arrow constants with frozen strings in public methods. Commits
245
+ [c0dff33](https://github.com/activerecord-hackery/ransack/commit/c0dff33),
246
+ [e489ca7](https://github.com/activerecord-hackery/ransack/commit/e489ca7).
247
+
248
+ *Jon Atack*
249
+
250
+ ## Version 1.8.0 - 2016-07-14
251
+ ### Added
252
+
253
+ * Support Mongoid 5. PR [#636](https://github.com/activerecord-hackery/ransack/pull/636), commit
254
+ [9e5faf4](https://github.com/activerecord-hackery/ransack/commit/9e5faf4).
255
+
256
+ *Josef Šimánek*
257
+
258
+ * Add optional block argument for the `sort_link` method. PR
259
+ [#604](https://github.com/activerecord-hackery/ransack/pull/604).
260
+
261
+ *Andrea Dal Ponte*
262
+
263
+ * Add `ransack_alias` to allow users to customize the names for long
264
+ ransack field names. PR
265
+ [#623](https://github.com/activerecord-hackery/ransack/pull/623).
266
+
267
+ *Ray Zane*
268
+
269
+ * Add support for searching on attributes that have been added to
270
+ Active Record models with `alias_attribute` (Rails >= 4 only). PR
271
+ [#592](https://github.com/activerecord-hackery/ransack/pull/592), commit
272
+ [549342a](https://github.com/activerecord-hackery/ransack/commit/549342a).
273
+
274
+ *Marten Schilstra*
275
+
276
+ * Add ability to globally hide sort link order indicator arrows with
277
+ `Ransack.configure#hide_sort_order_indicators = true`. PR
278
+ [#577](https://github.com/activerecord-hackery/ransack/pull/577), commit
279
+ [95d4591](https://github.com/activerecord-hackery/ransack/commit/95d4591).
280
+
281
+ *Josh Hunter*, *Jon Atack*
282
+
283
+ * Add test for `ActionController:Parameter` object params in `sort_link` to
284
+ ensure Ransack is handling the Rails 5 changes correctly. Commit
285
+ [b1cfed8](https://github.com/activerecord-hackery/ransack/commit/b1cfed8).
286
+
287
+ *Ryan Wood*
288
+
289
+ * Add failing tests to facilitate work on issue
290
+ [#566](https://github.com/activerecord-hackery/ransack/issues/566)
291
+ of passing boolean values to search scopes. PR
292
+ [#575](https://github.com/activerecord-hackery/ransack/pull/575).
293
+
294
+ *Marcel Eeken*
295
+
296
+ * Add i18n locale files:
297
+ * Taiwanese Hokkien/Mandarin (`zh-TW.yml`). PR
298
+ [#674](https://github.com/activerecord-hackery/ransack/pull/674). *Sibevin Wang*
299
+ * Danish (`da.yml`). PR
300
+ [#663](https://github.com/activerecord-hackery/ransack/pull/663). *Kasper Johansen*
301
+ * Brazilian Portuguese (`pt-BR.yml`). PR
302
+ [#581](https://github.com/activerecord-hackery/ransack/pull/581). *Diego Henrique Domingues*
303
+ * Indonesian (Bahasa) (`id.yml`). PR
304
+ [#612](https://github.com/activerecord-hackery/ransack/pull/612). *Adam Pahlevi Baihaqi*
305
+ * Japanese (`ja.yml`). PR
306
+ [#622](https://github.com/activerecord-hackery/ransack/pull/622). *Masanobu Mizutani*
307
+
308
+ ### Fixed
309
+
310
+ * In `FormHelper::SortLink#parameters_hash`, convert `params#to_unsafe_h`
311
+ only if Rails 5, and add tests. Commit
312
+ [14e66ca](https://github.com/activerecord-hackery/ransack/commit/14e66ca).
313
+
314
+ *Jon Atack*
315
+
316
+ * Respect negative conditions for collection associations and fix Mongoid
317
+ compat. PR [#645](https://github.com/activerecord-hackery/ransack/pull/645).
318
+
319
+ *Andrew Vit*
320
+
321
+ * Ensure conditions differing only by ransacker_args aren't filtered out.
322
+ PR [#665](https://github.com/activerecord-hackery/ransack/pull/665).
323
+
324
+ *Andrew Porterfield*
325
+
326
+ * Fix using aliased attributes in association searches, and add a failing
327
+ spec. PR [#602](https://github.com/activerecord-hackery/ransack/pull/602).
328
+
329
+ *Marten Schilstra*
330
+
331
+ * Replace Active Record `table_exists?` API that was deprecated
332
+ [here](https://github.com/rails/rails/commit/152b85f) in Rails 5. Commit
333
+ [c9d2297](https://github.com/activerecord-hackery/ransack/commit/c9d2297).
334
+
335
+ *Jon Atack*
336
+
337
+ * Adapt to changes in Rails 5 where AC::Parameters composes a HWIA instead of
338
+ inheriting from Hash starting from Rails commit rails/rails@14a3bd5. Commit
339
+ [ceafc05](https://github.com/activerecord-hackery/ransack/commit/ceafc05).
340
+
341
+ *Jon Atack*
342
+
343
+ * Fix test `#sort_link with hide order indicator set to true` to fail properly
344
+ ([4f65b09](https://github.com/activerecord-hackery/ransack/commit/4f65b09)).
345
+ This spec, added in
346
+ [#473](https://github.com/activerecord-hackery/ransack/pull/473), tested
347
+ the presence of the attribute name instead of the absence of the order
348
+ indicators and did not fail when it should.
349
+
350
+ *Josh Hunter*, *Jon Atack*
351
+
352
+ * Fix rspec-mocks `stub` deprecation warnings when running the tests. Commit
353
+ [600892e](https://github.com/activerecord-hackery/ransack/commit/600892e).
354
+
355
+ *Jon Atack*
356
+
357
+ * Revert
358
+ [f858dd6](https://github.com/activerecord-hackery/ransack/commit/f858dd6).
359
+ Fixes [#553](https://github.com/activerecord-hackery/ransack/issues/553)
360
+ performance regression with the SQL Server adapter.
361
+
362
+ *sschwing3*
363
+
364
+ * Fix invalid Chinese I18n locale file name by replacing "zh" with "zh-CN".
365
+ PR [#590](https://github.com/activerecord-hackery/ransack/pull/590).
366
+
367
+ *Ethan Yang*
368
+
369
+ ### Changed
370
+
371
+ * Memory/speed perf improvement: Freeze strings in array global constants and
372
+ partially move from using global string constants to frozen strings
373
+ ([381a83c](https://github.com/activerecord-hackery/ransack/commit/381a83c)
374
+ and
375
+ [ce114ec](https://github.com/activerecord-hackery/ransack/commit/ce114ec)).
376
+
377
+ *Jon Atack*
378
+
379
+ * Escape underscore `_` wildcard characters with PostgreSQL and MySQL. PR
380
+ [#584](https://github.com/activerecord-hackery/ransack/issues/584).
381
+
382
+ *Igor Dobryn*
383
+
384
+ * Refactor `Ransack::Adapters` from conditionals to classes
385
+ ([94a404c](https://github.com/activerecord-hackery/ransack/commit/94a404c)).
386
+
387
+ *Jon Atack*
5
388
 
6
389
  ## Version 1.7.0 - 2015-08-20
390
+ ### Added
391
+
392
+ * Add Mongoid support for referenced/embedded relations. PR
393
+ [#498](https://github.com/activerecord-hackery/ransack/pull/498).
394
+ TODO: Missing spec coverage! Add documentation!
395
+
396
+ *Penn Su*
397
+
398
+ * Add German i18n locale file (`de.yml`). PR
399
+ [#537](https://github.com/activerecord-hackery/ransack/pull/537).
400
+
401
+ *Philipp Weissensteiner*
402
+
7
403
  ### Fixed
8
404
 
9
405
  * Fix
@@ -44,8 +440,8 @@
44
440
 
45
441
  *Andrew Vit*
46
442
 
47
- * Fix RSpec `its` method deprecation warning: 'Use of rspec-core's `its`
48
- method is deprecated. Use the rspec-its gem instead
443
+ * Fix RSpec `its` method deprecation warning: "Use of rspec-core's its
444
+ method is deprecated. Use the rspec-its gem instead"
49
445
  ([c09aa17](https://github.com/activerecord-hackery/ransack/commit/c09aa17)).
50
446
 
51
447
  * Fix deprecated RSpec syntax in `grouping_spec.rb`
@@ -53,24 +449,11 @@
53
449
 
54
450
  *Jon Atack*
55
451
 
56
- ### Added
57
-
58
- * Add Mongoid support for referenced/embedded relations. PR
59
- [#498](https://github.com/activerecord-hackery/ransack/pull/498).
60
- TODO: Missing spec coverage! Add documentation!
61
-
62
- *Penn Su*
63
-
64
- * Add German locale file (de.yml). PR
65
- [#537](https://github.com/activerecord-hackery/ransack/pull/537).
66
-
67
- *Philipp Weissensteiner*
68
-
69
452
  ### Changed
70
453
 
71
454
  * Upgrade gemspec dependencies: MySQL2 from '0.3.14' to '0.3.18', and RSpec
72
455
  from '~> 2.14.0' to '~> 2' which loads 2.99
73
- ([000cd2](https://github.com/activerecord-hackery/ransack/commit/000cd2)).
456
+ ([000cd22](https://github.com/activerecord-hackery/ransack/commit/000cd22)).
74
457
 
75
458
  * Upgrade spec suite to RSpec 3 `expect` syntax backward compatible with
76
459
  RSpec 2.9
@@ -89,10 +472,12 @@
89
472
 
90
473
 
91
474
  ## Version 1.6.6 - 2015-04-05
92
- ### Changed
475
+ ### Added
93
476
 
94
- * Upgrade Polyamorous dependency to version 1.2.0, which uses `Module#prepend`
95
- instead of `alias_method` for hooking into Active Record (with Ruby 2.x).
477
+ * Add the Ruby version to the the header message that shows the database,
478
+ Active Record and Arel versions when running tests.
479
+
480
+ * Add Code Climate analysis.
96
481
 
97
482
  *Jon Atack*
98
483
 
@@ -117,12 +502,10 @@
117
502
 
118
503
  *Jon Atack*
119
504
 
120
- ### Added
121
-
122
- * Add the Ruby version to the the header message that shows the database,
123
- Active Record and Arel versions when running tests.
505
+ ### Changed
124
506
 
125
- * Add Code Climate analysis.
507
+ * Upgrade Polyamorous dependency to version 1.2.0, which uses `Module#prepend`
508
+ instead of `alias_method` for hooking into Active Record (with Ruby 2.x).
126
509
 
127
510
  *Jon Atack*
128
511
 
@@ -239,7 +622,7 @@
239
622
 
240
623
  *Josh Kovach*
241
624
 
242
- * Add an sort_link option to not display sort direction arrows
625
+ * Add an sort_link option to not display sort order indicator arrows
243
626
  ([PR #473](https://github.com/activerecord-hackery/ransack/pull/473)).
244
627
 
245
628
  *Fred Bergman*
@@ -427,7 +810,7 @@
427
810
 
428
811
  *Pedro Chambino*
429
812
 
430
- * Add `ro.yml` Romanian translation file.
813
+ * Add Romanian i18n locale file (`ro.yml`).
431
814
 
432
815
  *Andreas Philippi*
433
816