ransack 1.8.3 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +3 -0
  3. data/.travis.yml +26 -63
  4. data/CHANGELOG.md +187 -24
  5. data/CONTRIBUTING.md +9 -0
  6. data/Gemfile +5 -20
  7. data/README.md +163 -40
  8. data/Rakefile +1 -22
  9. data/lib/ransack/adapters/active_record/base.rb +11 -2
  10. data/lib/ransack/adapters/active_record/context.rb +178 -168
  11. data/lib/ransack/adapters/active_record/ransack/constants.rb +6 -3
  12. data/lib/ransack/adapters/active_record/ransack/context.rb +10 -16
  13. data/lib/ransack/adapters/active_record/ransack/nodes/condition.rb +3 -3
  14. data/lib/ransack/adapters/active_record/ransack/translate.rb +1 -5
  15. data/lib/ransack/adapters/active_record/ransack/visitor.rb +23 -0
  16. data/lib/ransack/adapters/active_record.rb +0 -9
  17. data/lib/ransack/adapters.rb +2 -0
  18. data/lib/ransack/configuration.rb +30 -4
  19. data/lib/ransack/constants.rb +4 -1
  20. data/lib/ransack/context.rb +29 -24
  21. data/lib/ransack/helpers/form_builder.rb +15 -3
  22. data/lib/ransack/helpers/form_helper.rb +8 -3
  23. data/lib/ransack/locale/ar.yml +70 -0
  24. data/lib/ransack/locale/az.yml +70 -0
  25. data/lib/ransack/locale/bg.yml +70 -0
  26. data/lib/ransack/locale/ca.yml +70 -0
  27. data/lib/ransack/locale/el.yml +70 -0
  28. data/lib/ransack/locale/es.yml +22 -22
  29. data/lib/ransack/locale/fa.yml +70 -0
  30. data/lib/ransack/locale/fi.yml +71 -0
  31. data/lib/ransack/locale/it.yml +70 -0
  32. data/lib/ransack/locale/nl.yml +4 -4
  33. data/lib/ransack/locale/ru.yml +70 -0
  34. data/lib/ransack/locale/tr.yml +70 -0
  35. data/lib/ransack/locale/zh-CN.yml +12 -12
  36. data/lib/ransack/nodes/attribute.rb +1 -1
  37. data/lib/ransack/nodes/grouping.rb +2 -7
  38. data/lib/ransack/nodes/value.rb +74 -68
  39. data/lib/ransack/predicate.rb +11 -19
  40. data/lib/ransack/search.rb +1 -1
  41. data/lib/ransack/translate.rb +115 -115
  42. data/lib/ransack/version.rb +1 -1
  43. data/lib/ransack/visitor.rb +1 -12
  44. data/lib/ransack.rb +5 -2
  45. data/logo/ransack-h.png +0 -0
  46. data/logo/ransack-h.svg +34 -0
  47. data/logo/ransack-v.png +0 -0
  48. data/logo/ransack-v.svg +34 -0
  49. data/logo/ransack.png +0 -0
  50. data/logo/ransack.svg +21 -0
  51. data/polyamorous/lib/polyamorous/activerecord_5.0_ruby_2/join_association.rb +2 -0
  52. data/polyamorous/lib/polyamorous/activerecord_5.0_ruby_2/join_dependency.rb +2 -0
  53. data/polyamorous/lib/polyamorous/activerecord_5.1_ruby_2/join_association.rb +31 -0
  54. data/polyamorous/lib/polyamorous/activerecord_5.1_ruby_2/join_dependency.rb +112 -0
  55. data/polyamorous/lib/polyamorous/activerecord_5.2.0_ruby_2/join_association.rb +31 -0
  56. data/polyamorous/lib/polyamorous/activerecord_5.2.0_ruby_2/join_dependency.rb +112 -0
  57. data/polyamorous/lib/polyamorous/activerecord_5.2.0_ruby_2/reflection.rb +12 -0
  58. data/polyamorous/lib/polyamorous/activerecord_5.2.1_ruby_2/join_association.rb +22 -0
  59. data/polyamorous/lib/polyamorous/activerecord_5.2.1_ruby_2/join_dependency.rb +81 -0
  60. data/polyamorous/lib/polyamorous/activerecord_5.2.1_ruby_2/reflection.rb +2 -0
  61. data/polyamorous/lib/polyamorous/activerecord_6.0_ruby_2/join_association.rb +2 -0
  62. data/polyamorous/lib/polyamorous/activerecord_6.0_ruby_2/join_dependency.rb +81 -0
  63. data/polyamorous/lib/polyamorous/activerecord_6.0_ruby_2/reflection.rb +2 -0
  64. data/polyamorous/lib/polyamorous/activerecord_6.1_ruby_2/join_association.rb +2 -0
  65. data/polyamorous/lib/polyamorous/activerecord_6.1_ruby_2/join_dependency.rb +2 -0
  66. data/polyamorous/lib/polyamorous/activerecord_6.1_ruby_2/reflection.rb +2 -0
  67. data/polyamorous/lib/polyamorous/join.rb +70 -0
  68. data/polyamorous/lib/polyamorous/swapping_reflection_class.rb +11 -0
  69. data/polyamorous/lib/polyamorous/tree_node.rb +7 -0
  70. data/polyamorous/lib/polyamorous/version.rb +3 -0
  71. data/polyamorous/lib/polyamorous.rb +29 -0
  72. data/polyamorous/polyamorous.gemspec +35 -0
  73. data/ransack.gemspec +9 -10
  74. data/spec/helpers/polyamorous_helper.rb +28 -0
  75. data/spec/ransack/adapters/active_record/base_spec.rb +74 -0
  76. data/spec/ransack/adapters/active_record/context_spec.rb +44 -6
  77. data/spec/ransack/configuration_spec.rb +17 -2
  78. data/spec/ransack/helpers/form_builder_spec.rb +3 -15
  79. data/spec/ransack/helpers/form_helper_spec.rb +88 -151
  80. data/spec/ransack/join_association_spec.rb +28 -0
  81. data/spec/ransack/join_dependency_spec.rb +97 -0
  82. data/spec/ransack/join_spec.rb +19 -0
  83. data/spec/ransack/predicate_spec.rb +16 -2
  84. data/spec/ransack/search_spec.rb +32 -3
  85. data/spec/spec_helper.rb +5 -0
  86. data/spec/support/schema.rb +45 -21
  87. metadata +81 -67
  88. data/lib/ransack/adapters/active_record/3.0/compat.rb +0 -179
  89. data/lib/ransack/adapters/active_record/3.0/context.rb +0 -203
  90. data/lib/ransack/adapters/active_record/3.1/context.rb +0 -212
  91. data/lib/ransack/adapters/active_record/3.2/context.rb +0 -44
  92. data/lib/ransack/adapters/active_record/compat.rb +0 -14
  93. data/lib/ransack/adapters/mongoid/3.2/.gitkeep +0 -0
  94. data/lib/ransack/adapters/mongoid/attributes/attribute.rb +0 -37
  95. data/lib/ransack/adapters/mongoid/attributes/order_predications.rb +0 -17
  96. data/lib/ransack/adapters/mongoid/attributes/predications.rb +0 -141
  97. data/lib/ransack/adapters/mongoid/base.rb +0 -134
  98. data/lib/ransack/adapters/mongoid/context.rb +0 -212
  99. data/lib/ransack/adapters/mongoid/inquiry_hash.rb +0 -23
  100. data/lib/ransack/adapters/mongoid/ransack/constants.rb +0 -88
  101. data/lib/ransack/adapters/mongoid/ransack/context.rb +0 -60
  102. data/lib/ransack/adapters/mongoid/ransack/nodes/condition.rb +0 -27
  103. data/lib/ransack/adapters/mongoid/ransack/translate.rb +0 -13
  104. data/lib/ransack/adapters/mongoid/ransack/visitor.rb +0 -24
  105. data/lib/ransack/adapters/mongoid/table.rb +0 -35
  106. data/lib/ransack/adapters/mongoid.rb +0 -15
  107. data/spec/mongoid/adapters/mongoid/base_spec.rb +0 -314
  108. data/spec/mongoid/adapters/mongoid/context_spec.rb +0 -56
  109. data/spec/mongoid/configuration_spec.rb +0 -162
  110. data/spec/mongoid/dependencies_spec.rb +0 -8
  111. data/spec/mongoid/helpers/ransack_helper.rb +0 -11
  112. data/spec/mongoid/nodes/condition_spec.rb +0 -49
  113. data/spec/mongoid/nodes/grouping_spec.rb +0 -13
  114. data/spec/mongoid/predicate_spec.rb +0 -155
  115. data/spec/mongoid/search_spec.rb +0 -445
  116. data/spec/mongoid/support/mongoid.yml +0 -11
  117. data/spec/mongoid/support/schema.rb +0 -135
  118. data/spec/mongoid/translate_spec.rb +0 -14
  119. data/spec/mongoid_spec_helper.rb +0 -63
  120. data/spec/ransack/dependencies_spec.rb +0 -12
@@ -6,11 +6,11 @@ es:
6
6
  or: "o"
7
7
  any: "cualquier"
8
8
  all: "todos"
9
- combinator: "combinado"
9
+ combinator: "combinador"
10
10
  attribute: "atributo"
11
11
  value: "valor"
12
12
  condition: "condición"
13
- sort: "ordernar"
13
+ sort: "ordenar"
14
14
  asc: "ascendente"
15
15
  desc: "descendente"
16
16
  predicates:
@@ -19,12 +19,12 @@ es:
19
19
  eq_all: "es igual a todos"
20
20
  not_eq: "no es igual a"
21
21
  not_eq_any: "no es igual a cualquier"
22
- not_eq_all: "no es iguala todos"
23
- matches: "coincidir"
24
- matches_any: "coincidir a cualquier"
25
- matches_all: "coincidir a todos"
26
- does_not_match: "no coincide"
27
- does_not_match_any: "no coincide con ninguna"
22
+ not_eq_all: "no es igual a todos"
23
+ matches: "coincide con"
24
+ matches_any: "coincide con cualquier"
25
+ matches_all: "coincide con todos"
26
+ does_not_match: "no coincide con"
27
+ does_not_match_any: "no coincide con ninguno"
28
28
  does_not_match_all: "no coincide con todos"
29
29
  lt: "menor que"
30
30
  lt_any: "menor que cualquier"
@@ -48,23 +48,23 @@ es:
48
48
  cont_any: "contiene cualquier"
49
49
  cont_all: "contiene todos"
50
50
  not_cont: "no contiene"
51
- not_cont_any: "no contiene ninguna"
52
- not_cont_all: "no contiene toda"
51
+ not_cont_any: "no contiene ninguno"
52
+ not_cont_all: "no contiene todos"
53
53
  start: "comienza con"
54
54
  start_any: "comienza con cualquier"
55
- start_all: "comienza con toda"
56
- not_start: "no inicia con"
55
+ start_all: "comienza con todos"
56
+ not_start: "no comienza con"
57
57
  not_start_any: "no comienza con cualquier"
58
- not_start_all: "no inicia con toda"
59
- end: "termina con"
60
- end_any: "termina con cualquier"
61
- end_all: "termina con todo"
62
- not_end: "no termina con"
63
- not_end_any: "no termina con cualquier"
64
- not_end_all: "no termina con todo"
58
+ not_start_all: "no comienza con todos"
59
+ end: "termina en"
60
+ end_any: "termina en cualquier"
61
+ end_all: "termina en todos"
62
+ not_end: "no termina en"
63
+ not_end_any: "no termina en cualquier"
64
+ not_end_all: "no termina en todos"
65
65
  'true': "es verdadero"
66
66
  'false': "es falso"
67
- present: "es presente"
67
+ present: "está presente"
68
68
  blank: "está en blanco"
69
- 'null': "es nula"
70
- not_null: "no es nula"
69
+ 'null': "es nulo"
70
+ not_null: "no es nulo"
@@ -0,0 +1,70 @@
1
+ fa:
2
+ ransack:
3
+ search: "جستجو"
4
+ predicate: "پیش فرض"
5
+ and: "و"
6
+ or: "یا"
7
+ any: "هر کدام"
8
+ all: "همه"
9
+ combinator: "ترکیب کننده"
10
+ attribute: "ویژگی"
11
+ value: "مقدار"
12
+ condition: "شرایط"
13
+ sort: "مرتب سازی"
14
+ asc: "صعودی"
15
+ desc: "نزولی"
16
+ predicates:
17
+ eq: "مساوی با"
18
+ eq_any: "مساوی با حداقل یکی"
19
+ eq_all: "مساوی با همه"
20
+ not_eq: "غیر مساوی با"
21
+ not_eq_any: "غیر مساوی با هیچ کدام"
22
+ not_eq_all: "غیر مساوی با همه"
23
+ matches: "مشابهات"
24
+ matches_any: "شبیه حداقل یکی"
25
+ matches_all: "شبیه همه"
26
+ does_not_match: "بدون شباهت"
27
+ does_not_match_any: "شبیه یکی هم نیست"
28
+ does_not_match_all: "شبیه هیچ کدام نیست"
29
+ lt: "کمتر از"
30
+ lt_any: "کمتر از حداقل یکی"
31
+ lt_all: "کمتر از همه"
32
+ lteq: "کمتر یا مساوی با"
33
+ lteq_any: "کمتر یا مساوی با حداقل یکی"
34
+ lteq_all: "کمتر یا مساوی با همه"
35
+ gt: "بیشتر از"
36
+ gt_any: "بیشتر از حداقل یکی"
37
+ gt_all: "بیشتر از همه"
38
+ gteq: "بیشتر یا مساوی با"
39
+ gteq_any: "بیشتر یا مساوی با حداقل یکی"
40
+ gteq_all: "بیشتر یا مساوی با همه"
41
+ in: "در"
42
+ in_any: "در حداقل یکی"
43
+ in_all: "در همه"
44
+ not_in: "نه در"
45
+ not_in_any: "نه حتی در یکی"
46
+ not_in_all: "در هیچ کدام"
47
+ cont: "حاوی"
48
+ cont_any: "حاوی حداقل یکی"
49
+ cont_all: "حاوی همه"
50
+ not_cont: "حاوی این نمیشود"
51
+ not_cont_any: "حاوی حتی یکی هم نمیشود"
52
+ not_cont_all: "حاوی هیچ کدام نمیشود"
53
+ start: "شروع می شود با"
54
+ start_any: "شروع می شود با حداقل یکی"
55
+ start_all: "شروع می شود با همه"
56
+ not_start: "شروع نمی شود با"
57
+ not_start_any: "شروع نمی شود با حتی یکی"
58
+ not_start_all: "شروع نمی شود با هیچ کدام"
59
+ end: "به پایان می رسد با"
60
+ end_any: "به پایان می رسد با حداقل یکی"
61
+ end_all: "به پایان می رسد با همه"
62
+ not_end: "پایان نمی یابد با"
63
+ not_end_any: "پایان نمی یابد با حتی یکی"
64
+ not_end_all: "پایان نمی یابد با هیچ کدام"
65
+ 'true': "درست است"
66
+ 'false': "نادرست است"
67
+ present: "موجود است"
68
+ blank: "خالی است"
69
+ 'null': "صفر است"
70
+ not_null: "صفر نیست"
@@ -0,0 +1,71 @@
1
+ fi:
2
+ ransack:
3
+ search: "haku"
4
+ predicate: "predikaatti"
5
+ and: "ja"
6
+ or: "tai"
7
+ any: "jokin"
8
+ all: "kaikki"
9
+ combinator: "kombinaattori"
10
+ attribute: "attribuutti"
11
+ value: "arvo"
12
+ condition: "ehto"
13
+ sort: "järjestys"
14
+ asc: "nouseva"
15
+ desc: "laskeva"
16
+ predicates:
17
+ eq: "sama kuin"
18
+ eq_any: "sama kuin jokin"
19
+ eq_all: "sama kuin kaikki"
20
+ not_eq: "eri kuin"
21
+ not_eq_any: "eri kuin jokin"
22
+ not_eq_all: "eri kuin kaikki"
23
+ matches: "täsmää"
24
+ matches_any: "täsmää jonkun kanssa"
25
+ matches_all: "täsmää kaikkien kanssa"
26
+ does_not_match: "ei täsmää"
27
+ does_not_match_any: "ei täsmää minkään kanssa"
28
+ does_not_match_all: "ei täsmää kaikkien kanssa"
29
+ lt: "vähemmän kuin"
30
+ lt_any: "vähemmän kuin jokin"
31
+ lt_all: "vähemmän kuin mikään"
32
+ lteq: "vähemmän tai sama kuin"
33
+ lteq_any: "vähemmän tai sama kuin jokin"
34
+ lteq_all: "vähemmän tai sama kuin mikään"
35
+ gt: "suurempi kuin"
36
+ gt_any: "suurempi kuin jokin"
37
+ gt_all: "suurempi kuin mikään"
38
+ gteq: "suurempi tai yhtä suuri kuin"
39
+ gteq_any: "suurempi tai yhtä suuri kuin jokin"
40
+ gteq_all: "suurempi tai yhtä suuri kuin mikään"
41
+ in: "kohteessa"
42
+ in_any: "jossakin kohteessa"
43
+ in_all: "kaikissa kohteissa"
44
+ not_in: "ei kohteessa"
45
+ not_in_any: "ei jossakin kohteista"
46
+ not_in_all: "ei missään kohteista"
47
+ cont: "sisältää"
48
+ cont_any: "sisältää jonkin"
49
+ cont_all: "sisältää kaikki"
50
+ not_cont: "ei sisällä"
51
+ not_cont_any: "ei sisällä jotakin"
52
+ not_cont_all: "ei sisällä mitään"
53
+ start: "alkaa"
54
+ start_any: "alkaa jollakin"
55
+ start_all: "alkaa kaikilla"
56
+ not_start: "ei ala"
57
+ not_start_any: "ei ala jollakin"
58
+ not_start_all: "ei ala millään"
59
+ end: "päättyy"
60
+ end_any: "päättyy jollakin"
61
+ end_all: "päättyy millään"
62
+ not_end: "ei pääty"
63
+ not_end_any: "ei pääty jollakin"
64
+ not_end_all: "ei pääty millään"
65
+ 'true': "on tosi"
66
+ 'false': "ei ole tosi"
67
+ present: "on läsnä"
68
+ blank: "on tyhjä"
69
+ 'null': "on määrittämätön"
70
+ not_null: "on määritetty"
71
+
@@ -0,0 +1,70 @@
1
+ it:
2
+ ransack:
3
+ search: "cerca"
4
+ predicate: "predicato"
5
+ and: "e"
6
+ or: "o"
7
+ any: "qualsiasi"
8
+ all: "tutti"
9
+ combinator: "combinatore"
10
+ attribute: "attributo"
11
+ value: "valore"
12
+ condition: "condizione"
13
+ sort: "ordinamento"
14
+ asc: "crescente"
15
+ desc: "decrescente"
16
+ predicates:
17
+ eq: "uguale a"
18
+ eq_any: "uguale ad almeno un"
19
+ eq_all: "uguale ad ognuno"
20
+ not_eq: "diverso da"
21
+ not_eq_any: "diverso da uno qualsiasi"
22
+ not_eq_all: "diverso da tutti"
23
+ matches: "combacia con"
24
+ matches_any: "combacia con almeno un"
25
+ matches_all: "combacia con tutti"
26
+ does_not_match: "non corrisponde"
27
+ does_not_match_any: "non corrisponde ad uno qualsiasi"
28
+ does_not_match_all: "non corrisponde con nessuno"
29
+ lt: "minore di"
30
+ lt_any: "minore di almeno un"
31
+ lt_all: "minore di tutti"
32
+ lteq: "minore o uguale a"
33
+ lteq_any: "minore o uguale ad almeno un"
34
+ lteq_all: "minore o uguale a tutti"
35
+ gt: "maggiore di"
36
+ gt_any: "maggiore di almeno un"
37
+ gt_all: "maggiore di tutti"
38
+ gteq: "maggiore o uguale a"
39
+ gteq_any: "maggiore o uguale ad almeno un"
40
+ gteq_all: "maggiore o uguale a tutti"
41
+ in: "in"
42
+ in_any: "in almeno un"
43
+ in_all: "in tutti"
44
+ not_in: "non in"
45
+ not_in_any: "non in almeno un"
46
+ not_in_all: "non in tutti"
47
+ cont: "contiene"
48
+ cont_any: "contiene almeno un"
49
+ cont_all: "contiene tutti"
50
+ not_cont: "non contiene"
51
+ not_cont_any: "non contiene un qualsiasi"
52
+ not_cont_all: "non contiene nessuno"
53
+ start: "inizia con"
54
+ start_any: "inizia con almeno un"
55
+ start_all: "inizia con tutti"
56
+ not_start: "non inizia con"
57
+ not_start_any: "non inizia con uno qualsiasi"
58
+ not_start_all: "non inizia con nessuno"
59
+ end: "finisce con"
60
+ end_any: "finisce con almeno un"
61
+ end_all: "finisce con tutti"
62
+ not_end: "non finisce con"
63
+ not_end_any: "non finisce con uno qualsiasi"
64
+ not_end_all: "non finisce con nessuno"
65
+ 'true': "è vero"
66
+ 'false': "è falso"
67
+ present: "è presente"
68
+ blank: "è vuoto"
69
+ 'null': "è nullo"
70
+ not_null: "non è nullo"
@@ -35,9 +35,9 @@ nl:
35
35
  gt: "groter dan"
36
36
  gt_any: "groter dan enig"
37
37
  gt_all: "groter dan alle"
38
- gteq: "groter dan or equal to"
39
- gteq_any: "groter dan or equal to enig"
40
- gteq_all: "groter dan or equal to alle"
38
+ gteq: "groter dan of gelijk aan"
39
+ gteq_any: "groter dan of gelijk aan enig"
40
+ gteq_all: "groter dan of gelijk aan alle"
41
41
  in: "in"
42
42
  in_any: "in enig"
43
43
  in_all: "in alle"
@@ -64,7 +64,7 @@ nl:
64
64
  not_end_all: "eindigt niet met alle"
65
65
  'true': "is waar"
66
66
  'false': "is niet waar"
67
- present: "is present"
67
+ present: "is aanwezig"
68
68
  blank: "is afwezig"
69
69
  'null': "is null"
70
70
  not_null: "is niet null"
@@ -0,0 +1,70 @@
1
+ ru:
2
+ ransack:
3
+ search: "Поиск"
4
+ predicate: "predicate"
5
+ and: "и"
6
+ or: "или"
7
+ any: "любое"
8
+ all: "все"
9
+ combinator: "combinator"
10
+ attribute: "аттрибут"
11
+ value: "значение"
12
+ condition: "условие"
13
+ sort: "сортировка"
14
+ asc: "по возрастанию"
15
+ desc: "по убыванию"
16
+ predicates:
17
+ eq: "равный"
18
+ eq_any: "равный любому"
19
+ eq_all: "равный всем"
20
+ not_eq: "не равный любому"
21
+ not_eq_any: "не равный любому"
22
+ not_eq_all: "не равный всем"
23
+ matches: "совпадение"
24
+ matches_any: "совпадение любому"
25
+ matches_all: "совпадение всем"
26
+ does_not_match: "не совпадение"
27
+ does_not_match_any: "не совпадение любому"
28
+ does_not_match_all: "не совпадение всем"
29
+ lt: "меньше чем"
30
+ lt_any: "меньше чем любое"
31
+ lt_all: "меньше чем все"
32
+ lteq: "меньше чем или равен"
33
+ lteq_any: "меньше чем или равен любому"
34
+ lteq_all: "меньше чем или равен всем"
35
+ gt: "больше чем"
36
+ gt_any: "больше чем любое"
37
+ gt_all: "больше чем все"
38
+ gteq: "больше чем или равен"
39
+ gteq_any: "больше чем или равен любому"
40
+ gteq_all: "больше чем или равен всем"
41
+ in: "в"
42
+ in_any: "в любом из"
43
+ in_all: "во всех"
44
+ not_in: "нет в"
45
+ not_in_any: "не в каком из"
46
+ not_in_all: "нет во всех"
47
+ cont: "содержит"
48
+ cont_any: "содержит любое"
49
+ cont_all: "содержит все"
50
+ not_cont: "не содержит"
51
+ not_cont_any: "не содержит любое"
52
+ not_cont_all: "не содержит все"
53
+ start: "начинается с"
54
+ start_any: "начинается с любого"
55
+ start_all: "начинается с всего"
56
+ not_start: "не начинается с"
57
+ not_start_any: "не начинается с любого"
58
+ not_start_all: "не начинается со всего"
59
+ end: "кончается с"
60
+ end_any: "кончается с любого"
61
+ end_all: "кончается со всего"
62
+ not_end: "не кончается с"
63
+ not_end_any: "не кончается с любого"
64
+ not_end_all: "не кончается со всего"
65
+ 'true': "верно"
66
+ 'false': "не верно"
67
+ present: "настоящее"
68
+ blank: "пусто"
69
+ 'null': "нулевой"
70
+ not_null: "не нулевой"
@@ -0,0 +1,70 @@
1
+ tr:
2
+ ransack:
3
+ search: "ara"
4
+ predicate: "doğrula"
5
+ and: "ve"
6
+ or: "veya"
7
+ any: "herhangi"
8
+ all: "hepsi"
9
+ combinator: "birleştirici"
10
+ attribute: "nitelik"
11
+ value: "değer"
12
+ condition: "şart"
13
+ sort: "sırala"
14
+ asc: "artan"
15
+ desc: "azalan"
16
+ predicates:
17
+ eq: "eşit"
18
+ eq_any: "herhangi birine eşit"
19
+ eq_all: "hepsine eşit"
20
+ not_eq: "eşit değil"
21
+ not_eq_any: "herhangi birine eşit değil"
22
+ not_eq_all: "hiçbirine eşit değil"
23
+ matches: "eşleşen"
24
+ matches_any: "herhangi biri ile eşleşen"
25
+ matches_all: "hepsi ile eşleşen"
26
+ does_not_match: "eşleşmeyen"
27
+ does_not_match_any: "herhangi biri ile eşleşmeyen"
28
+ does_not_match_all: "hiçbiri ile eşleşmeyen"
29
+ lt: "daha küçük"
30
+ lt_any: "herhangi birinden küçük"
31
+ lt_all: "hepsinden küçük"
32
+ lteq: "daha küçük veya eşit"
33
+ lteq_any: "daha küçük veya herhangi birine eşit"
34
+ lteq_all: "daha küçük veya hepsine eşit"
35
+ gt: "daha büyük "
36
+ gt_any: "herhangi birinden daha büyük"
37
+ gt_all: "hepsinden daha büyük"
38
+ gteq: "daha büyük veya eşit"
39
+ gteq_any: "daha büyük veya herhangi birine eşit"
40
+ gteq_all: "daha büyük veya hepsine eşit"
41
+ in: "içinde"
42
+ in_any: "herhangi birinde"
43
+ in_all: "hepsinde"
44
+ not_in: "içinde değil"
45
+ not_in_any: "herhangi birinde değil"
46
+ not_in_all: "hiçbirinde değil"
47
+ cont: "içeren"
48
+ cont_any: "herhangi birini içeren"
49
+ cont_all: "hepsini içeren"
50
+ not_cont: "içermeyen"
51
+ not_cont_any: "herhangi birini içermeyen"
52
+ not_cont_all: "hiçbirini birini içermeyen"
53
+ start: "ile başlayan"
54
+ start_any: "herhangi biriyle başlayan"
55
+ start_all: "hepsiyle başlayan"
56
+ not_start: "ile başlamayan"
57
+ not_start_any: "herhangi biriyle başlamayan"
58
+ not_start_all: "hiçbiriyle başlamayan"
59
+ end: "ile biten"
60
+ end_any: "herhangi biriyle biten"
61
+ end_all: "hepsi ile biten"
62
+ not_end: "ile bitmeyen"
63
+ not_end_any: "herhangi biriyle bitmeyen"
64
+ not_end_all: "hiçbiriyle bitmeyen"
65
+ 'true': "doğru"
66
+ 'false': "yanlış"
67
+ present: "mevcut"
68
+ blank: "boş"
69
+ 'null': "geçersiz"
70
+ not_null: "geçerli"
@@ -50,18 +50,18 @@ zh-CN:
50
50
  not_cont: "不包含"
51
51
  not_cont_any: "不包含任意一个值"
52
52
  not_cont_all: "不包含所有值"
53
- start: "以改值开始"
54
- start_any: "以任意一个值开始"
55
- start_all: "以所有值开始"
56
- not_start: "不以改值开始"
57
- not_start_any: "不以任意一个值开始"
58
- not_start_all: "不以所有值开始"
59
- end: "以改值结尾"
60
- end_any: "以任意一个值结尾"
61
- end_all: "以所有值结尾"
62
- not_end: "不以改值结尾"
63
- not_end_any: "不以任意一个值结尾"
64
- not_end_all: "不以所有值结尾"
53
+ start: "始于"
54
+ start_any: "始于任一值"
55
+ start_all: "始于任意值"
56
+ not_start: "非始于"
57
+ not_start_any: "非始于任一值"
58
+ not_start_all: "非始于任意值"
59
+ end: "止于"
60
+ end_any: "止于任一值"
61
+ end_all: "止于任意值"
62
+ not_end: "非止于"
63
+ not_end_any: "非止于任一值"
64
+ not_end_all: "非止于任意值"
65
65
  'true': "等于true"
66
66
  'false': "等于false"
67
67
  present: "有值"
@@ -5,7 +5,7 @@ module Ransack
5
5
 
6
6
  attr_reader :name, :ransacker_args
7
7
 
8
- delegate :blank?, :present?, :==, :to => :name
8
+ delegate :blank?, :present?, :to => :name
9
9
  delegate :engine, :to => :context
10
10
 
11
11
  def initialize(context, name = nil, ransacker_args = [])
@@ -49,11 +49,7 @@ module Ransack
49
49
  alias :c= :conditions=
50
50
 
51
51
  def [](key)
52
- if condition = conditions.detect { |c| c.key == key.to_s }
53
- condition
54
- else
55
- nil
56
- end
52
+ conditions.detect { |c| c.key == key.to_s }
57
53
  end
58
54
 
59
55
  def []=(key, value)
@@ -68,7 +64,6 @@ module Ransack
68
64
  def respond_to?(method_id)
69
65
  super or begin
70
66
  method_name = method_id.to_s
71
- writer = method_name.sub!(/\=$/, ''.freeze)
72
67
  attribute_method?(method_name) ? true : false
73
68
  end
74
69
  end
@@ -191,7 +186,7 @@ module Ransack
191
186
  end
192
187
 
193
188
  def strip_predicate_and_index(str)
194
- string = str.split(/\(/).first
189
+ string = str[/(.+?)\(/, 1] || str.dup
195
190
  Predicate.detect_and_strip_from_string!(string)
196
191
  string
197
192
  end