ransack 1.8.3 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +3 -0
- data/.travis.yml +26 -63
- data/CHANGELOG.md +187 -24
- data/CONTRIBUTING.md +9 -0
- data/Gemfile +5 -20
- data/README.md +163 -40
- data/Rakefile +1 -22
- data/lib/ransack/adapters/active_record/base.rb +11 -2
- data/lib/ransack/adapters/active_record/context.rb +178 -168
- data/lib/ransack/adapters/active_record/ransack/constants.rb +6 -3
- data/lib/ransack/adapters/active_record/ransack/context.rb +10 -16
- data/lib/ransack/adapters/active_record/ransack/nodes/condition.rb +3 -3
- data/lib/ransack/adapters/active_record/ransack/translate.rb +1 -5
- data/lib/ransack/adapters/active_record/ransack/visitor.rb +23 -0
- data/lib/ransack/adapters/active_record.rb +0 -9
- data/lib/ransack/adapters.rb +2 -0
- data/lib/ransack/configuration.rb +30 -4
- data/lib/ransack/constants.rb +4 -1
- data/lib/ransack/context.rb +29 -24
- data/lib/ransack/helpers/form_builder.rb +15 -3
- data/lib/ransack/helpers/form_helper.rb +8 -3
- data/lib/ransack/locale/ar.yml +70 -0
- data/lib/ransack/locale/az.yml +70 -0
- data/lib/ransack/locale/bg.yml +70 -0
- data/lib/ransack/locale/ca.yml +70 -0
- data/lib/ransack/locale/el.yml +70 -0
- data/lib/ransack/locale/es.yml +22 -22
- data/lib/ransack/locale/fa.yml +70 -0
- data/lib/ransack/locale/fi.yml +71 -0
- data/lib/ransack/locale/it.yml +70 -0
- data/lib/ransack/locale/nl.yml +4 -4
- data/lib/ransack/locale/ru.yml +70 -0
- data/lib/ransack/locale/tr.yml +70 -0
- data/lib/ransack/locale/zh-CN.yml +12 -12
- data/lib/ransack/nodes/attribute.rb +1 -1
- data/lib/ransack/nodes/grouping.rb +2 -7
- data/lib/ransack/nodes/value.rb +74 -68
- data/lib/ransack/predicate.rb +11 -19
- data/lib/ransack/search.rb +1 -1
- data/lib/ransack/translate.rb +115 -115
- data/lib/ransack/version.rb +1 -1
- data/lib/ransack/visitor.rb +1 -12
- data/lib/ransack.rb +5 -2
- data/logo/ransack-h.png +0 -0
- data/logo/ransack-h.svg +34 -0
- data/logo/ransack-v.png +0 -0
- data/logo/ransack-v.svg +34 -0
- data/logo/ransack.png +0 -0
- data/logo/ransack.svg +21 -0
- data/polyamorous/lib/polyamorous/activerecord_5.0_ruby_2/join_association.rb +2 -0
- data/polyamorous/lib/polyamorous/activerecord_5.0_ruby_2/join_dependency.rb +2 -0
- data/polyamorous/lib/polyamorous/activerecord_5.1_ruby_2/join_association.rb +31 -0
- data/polyamorous/lib/polyamorous/activerecord_5.1_ruby_2/join_dependency.rb +112 -0
- data/polyamorous/lib/polyamorous/activerecord_5.2.0_ruby_2/join_association.rb +31 -0
- data/polyamorous/lib/polyamorous/activerecord_5.2.0_ruby_2/join_dependency.rb +112 -0
- data/polyamorous/lib/polyamorous/activerecord_5.2.0_ruby_2/reflection.rb +12 -0
- data/polyamorous/lib/polyamorous/activerecord_5.2.1_ruby_2/join_association.rb +22 -0
- data/polyamorous/lib/polyamorous/activerecord_5.2.1_ruby_2/join_dependency.rb +81 -0
- data/polyamorous/lib/polyamorous/activerecord_5.2.1_ruby_2/reflection.rb +2 -0
- data/polyamorous/lib/polyamorous/activerecord_6.0_ruby_2/join_association.rb +2 -0
- data/polyamorous/lib/polyamorous/activerecord_6.0_ruby_2/join_dependency.rb +81 -0
- data/polyamorous/lib/polyamorous/activerecord_6.0_ruby_2/reflection.rb +2 -0
- data/polyamorous/lib/polyamorous/activerecord_6.1_ruby_2/join_association.rb +2 -0
- data/polyamorous/lib/polyamorous/activerecord_6.1_ruby_2/join_dependency.rb +2 -0
- data/polyamorous/lib/polyamorous/activerecord_6.1_ruby_2/reflection.rb +2 -0
- data/polyamorous/lib/polyamorous/join.rb +70 -0
- data/polyamorous/lib/polyamorous/swapping_reflection_class.rb +11 -0
- data/polyamorous/lib/polyamorous/tree_node.rb +7 -0
- data/polyamorous/lib/polyamorous/version.rb +3 -0
- data/polyamorous/lib/polyamorous.rb +29 -0
- data/polyamorous/polyamorous.gemspec +35 -0
- data/ransack.gemspec +9 -10
- data/spec/helpers/polyamorous_helper.rb +28 -0
- data/spec/ransack/adapters/active_record/base_spec.rb +74 -0
- data/spec/ransack/adapters/active_record/context_spec.rb +44 -6
- data/spec/ransack/configuration_spec.rb +17 -2
- data/spec/ransack/helpers/form_builder_spec.rb +3 -15
- data/spec/ransack/helpers/form_helper_spec.rb +88 -151
- data/spec/ransack/join_association_spec.rb +28 -0
- data/spec/ransack/join_dependency_spec.rb +97 -0
- data/spec/ransack/join_spec.rb +19 -0
- data/spec/ransack/predicate_spec.rb +16 -2
- data/spec/ransack/search_spec.rb +32 -3
- data/spec/spec_helper.rb +5 -0
- data/spec/support/schema.rb +45 -21
- metadata +81 -67
- data/lib/ransack/adapters/active_record/3.0/compat.rb +0 -179
- data/lib/ransack/adapters/active_record/3.0/context.rb +0 -203
- data/lib/ransack/adapters/active_record/3.1/context.rb +0 -212
- data/lib/ransack/adapters/active_record/3.2/context.rb +0 -44
- data/lib/ransack/adapters/active_record/compat.rb +0 -14
- data/lib/ransack/adapters/mongoid/3.2/.gitkeep +0 -0
- data/lib/ransack/adapters/mongoid/attributes/attribute.rb +0 -37
- data/lib/ransack/adapters/mongoid/attributes/order_predications.rb +0 -17
- data/lib/ransack/adapters/mongoid/attributes/predications.rb +0 -141
- data/lib/ransack/adapters/mongoid/base.rb +0 -134
- data/lib/ransack/adapters/mongoid/context.rb +0 -212
- data/lib/ransack/adapters/mongoid/inquiry_hash.rb +0 -23
- data/lib/ransack/adapters/mongoid/ransack/constants.rb +0 -88
- data/lib/ransack/adapters/mongoid/ransack/context.rb +0 -60
- data/lib/ransack/adapters/mongoid/ransack/nodes/condition.rb +0 -27
- data/lib/ransack/adapters/mongoid/ransack/translate.rb +0 -13
- data/lib/ransack/adapters/mongoid/ransack/visitor.rb +0 -24
- data/lib/ransack/adapters/mongoid/table.rb +0 -35
- data/lib/ransack/adapters/mongoid.rb +0 -15
- data/spec/mongoid/adapters/mongoid/base_spec.rb +0 -314
- data/spec/mongoid/adapters/mongoid/context_spec.rb +0 -56
- data/spec/mongoid/configuration_spec.rb +0 -162
- data/spec/mongoid/dependencies_spec.rb +0 -8
- data/spec/mongoid/helpers/ransack_helper.rb +0 -11
- data/spec/mongoid/nodes/condition_spec.rb +0 -49
- data/spec/mongoid/nodes/grouping_spec.rb +0 -13
- data/spec/mongoid/predicate_spec.rb +0 -155
- data/spec/mongoid/search_spec.rb +0 -445
- data/spec/mongoid/support/mongoid.yml +0 -11
- data/spec/mongoid/support/schema.rb +0 -135
- data/spec/mongoid/translate_spec.rb +0 -14
- data/spec/mongoid_spec_helper.rb +0 -63
- data/spec/ransack/dependencies_spec.rb +0 -12
data/lib/ransack/locale/es.yml
CHANGED
@@ -6,11 +6,11 @@ es:
|
|
6
6
|
or: "o"
|
7
7
|
any: "cualquier"
|
8
8
|
all: "todos"
|
9
|
-
combinator: "
|
9
|
+
combinator: "combinador"
|
10
10
|
attribute: "atributo"
|
11
11
|
value: "valor"
|
12
12
|
condition: "condición"
|
13
|
-
sort: "
|
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
|
23
|
-
matches: "
|
24
|
-
matches_any: "
|
25
|
-
matches_all: "
|
26
|
-
does_not_match: "no coincide"
|
27
|
-
does_not_match_any: "no coincide con
|
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
|
52
|
-
not_cont_all: "no contiene
|
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
|
56
|
-
not_start: "no
|
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
|
59
|
-
end: "termina
|
60
|
-
end_any: "termina
|
61
|
-
end_all: "termina
|
62
|
-
not_end: "no termina
|
63
|
-
not_end_any: "no termina
|
64
|
-
not_end_all: "no termina
|
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: "
|
67
|
+
present: "está presente"
|
68
68
|
blank: "está en blanco"
|
69
|
-
'null': "es
|
70
|
-
not_null: "no es
|
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"
|
data/lib/ransack/locale/nl.yml
CHANGED
@@ -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
|
39
|
-
gteq_any: "groter dan
|
40
|
-
gteq_all: "groter dan
|
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
|
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: "有值"
|
@@ -49,11 +49,7 @@ module Ransack
|
|
49
49
|
alias :c= :conditions=
|
50
50
|
|
51
51
|
def [](key)
|
52
|
-
|
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
|
189
|
+
string = str[/(.+?)\(/, 1] || str.dup
|
195
190
|
Predicate.detect_and_strip_from_string!(string)
|
196
191
|
string
|
197
192
|
end
|