ransack 2.0.1 → 2.1.1

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.
@@ -43,6 +43,9 @@ class Person < ActiveRecord::Base
43
43
  of_age ? where("age >= ?", 18) : where("age < ?", 18)
44
44
  }
45
45
 
46
+ scope :sort_by_reverse_name_asc, lambda { order(Arel.sql("REVERSE(name) ASC")) }
47
+ scope :sort_by_reverse_name_desc, lambda { order("REVERSE(name) DESC") }
48
+
46
49
  alias_attribute :full_name, :name
47
50
 
48
51
  ransack_alias :term, :name_or_email
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ransack
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernie Miller
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2018-08-18 00:00:00.000000000 Z
14
+ date: 2018-12-05 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: actionpack
@@ -202,7 +202,6 @@ files:
202
202
  - lib/ransack/adapters.rb
203
203
  - lib/ransack/adapters/active_record.rb
204
204
  - lib/ransack/adapters/active_record/base.rb
205
- - lib/ransack/adapters/active_record/compat.rb
206
205
  - lib/ransack/adapters/active_record/context.rb
207
206
  - lib/ransack/adapters/active_record/ransack/constants.rb
208
207
  - lib/ransack/adapters/active_record/ransack/context.rb
@@ -215,10 +214,13 @@ files:
215
214
  - lib/ransack/helpers.rb
216
215
  - lib/ransack/helpers/form_builder.rb
217
216
  - lib/ransack/helpers/form_helper.rb
217
+ - lib/ransack/locale/ar.yml
218
218
  - lib/ransack/locale/az.yml
219
+ - lib/ransack/locale/bg.yml
219
220
  - lib/ransack/locale/cs.yml
220
221
  - lib/ransack/locale/da.yml
221
222
  - lib/ransack/locale/de.yml
223
+ - lib/ransack/locale/el.yml
222
224
  - lib/ransack/locale/en.yml
223
225
  - lib/ransack/locale/es.yml
224
226
  - lib/ransack/locale/fr.yml
@@ -248,6 +250,12 @@ files:
248
250
  - lib/ransack/translate.rb
249
251
  - lib/ransack/version.rb
250
252
  - lib/ransack/visitor.rb
253
+ - logo/ransack-h.png
254
+ - logo/ransack-h.svg
255
+ - logo/ransack-v.png
256
+ - logo/ransack-v.svg
257
+ - logo/ransack.png
258
+ - logo/ransack.svg
251
259
  - ransack.gemspec
252
260
  - spec/blueprints/articles.rb
253
261
  - spec/blueprints/comments.rb
@@ -1,14 +0,0 @@
1
- module Arel
2
-
3
- module Visitors
4
-
5
- class DepthFirst < Visitor
6
-
7
- unless method_defined?(:visit_Arel_Nodes_InfixOperation)
8
- alias :visit_Arel_Nodes_InfixOperation :binary
9
- end
10
-
11
- end
12
-
13
- end
14
- end