index_for 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/index_for/builders/wice_head_column_builder.rb +9 -3
- data/lib/index_for/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26d75d92ddc4ff88a1c01e968ac8eb9dffe1febf
|
4
|
+
data.tar.gz: 46dacd22ad41d07eaa993dcb6645658aaf61e61d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a28d998a70a5be26ab3b92ffcbd418f195957d8ab524d6ebeda55e3b9d4294f6fe900325bde388d437f18d0ae142cc4675d0262f6e0965017643f4640ae02b8
|
7
|
+
data.tar.gz: 1407a496d1d763deb10932f24a6fbc0469b2f9b3ce47ea0dd2fcbaa43a55c03df2d0a0f80fd0df9d73e2c2e32e502925215cd53e566d9164da283abd33887049
|
@@ -16,10 +16,16 @@ module IndexFor
|
|
16
16
|
"desc"
|
17
17
|
end
|
18
18
|
|
19
|
+
sorting = params[:sortable] != false && options[:sortable] != false
|
20
|
+
|
19
21
|
sorting_class = if order == params[:order]
|
20
22
|
"sorting #{direction}"
|
21
|
-
|
22
|
-
"sorting"
|
23
|
+
elsif sorting
|
24
|
+
"sorting"
|
25
|
+
end
|
26
|
+
|
27
|
+
sorting_url = if sorting
|
28
|
+
@template.url_for(params.merge(order: order, direction: reverse_direction))
|
23
29
|
end
|
24
30
|
|
25
31
|
append_html_class options, attribute_class_name(attribute_name), sorting_class
|
@@ -28,7 +34,7 @@ module IndexFor
|
|
28
34
|
|
29
35
|
options[:html] ||= {}
|
30
36
|
options[:html][:data] ||= {}
|
31
|
-
options[:html][:data][:href] =
|
37
|
+
options[:html][:data][:href] = sorting_url
|
32
38
|
|
33
39
|
wrap_with :table_head_cell, attribute_label(attribute_name, options), options
|
34
40
|
end
|
data/lib/index_for/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: index_for
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Theo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
151
|
version: '0'
|
152
152
|
requirements: []
|
153
153
|
rubyforge_project:
|
154
|
-
rubygems_version: 2.4
|
154
|
+
rubygems_version: 2.6.14.4
|
155
155
|
signing_key:
|
156
156
|
specification_version: 4
|
157
157
|
summary: Wrap your objects with a helper to easily list them
|