index_for 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 26b5255be6caaa47b9cc3cef7075cced013a4492
4
- data.tar.gz: c1fc66fe0061e20a197a41ad68f94ecefba500a1
3
+ metadata.gz: fd2792a5f94dea8fb9f4a3a2f9da83dffa4c684b
4
+ data.tar.gz: 9e8adff35f4d147c0403dbb13ef931aae14677e1
5
5
  SHA512:
6
- metadata.gz: dd9f117a518441292483f6adc82a68e46382f7d29566aa8dc5c7cd37f28fa2c62591df261134616b61b69799828a0da69b4c9b9f452bf310e784f5c9c7036f0b
7
- data.tar.gz: 7bb0e089ac539e666e47873cffb82283cf346ba69e82bcfe42e3f27474f5a1095092f2f025ff10b77288edd80e9a1a0391ac4a731f0b00f5a67196469225d777
6
+ metadata.gz: 6e033886586e5dbbf81c6f85c29810b44558e89b8bffda374e7bf9d514f31f77506b52ea62738e1e66cc00de3963862a1c8d8a1ae40a5971ca5f3c6713be194a
7
+ data.tar.gz: 31580f4b85224ccfb321a9fd98d5d7a08d98f7ab5029b17b7c50bbd4a9b54b8090e2bada7b3344b85859f1a739943713840049e27114fdda29ba89b1ff59ef3c
@@ -88,9 +88,9 @@ module IndexFor
88
88
  when String
89
89
  content.empty? ? blank_content(options) : content
90
90
  when TrueClass
91
- translate :"index_for.yes", :default => "Yes"
91
+ translate :yes, :default => "Yes"
92
92
  when FalseClass
93
- translate :"index_for.no", :default => "No"
93
+ translate :no, :default => "No"
94
94
  when NilClass
95
95
  blank_content(options)
96
96
  when Date, Time, DateTime
@@ -44,8 +44,9 @@ module IndexFor
44
44
  end
45
45
 
46
46
  def per_pages
47
+ params = template.params.permit!
47
48
  IndexFor.per_pages.each do |per_page|
48
- yield per_page, @template.url_for(template.params.merge(page: nil, per_page: per_page)), per_page == self.per_page
49
+ yield per_page, @template.url_for(params.merge(page: nil, per_page: per_page)), per_page == self.per_page
49
50
  end
50
51
  end
51
52
 
@@ -24,9 +24,11 @@ module IndexFor
24
24
 
25
25
  append_html_class options, attribute_class_name(attribute_name), sorting_class
26
26
 
27
+ params = template.params.permit!
28
+
27
29
  options[:html] ||= {}
28
30
  options[:html][:data] ||= {}
29
- options[:html][:data][:href] = @template.url_for(@template.params.merge(order: order, direction: reverse_direction))
31
+ options[:html][:data][:href] = @template.url_for(params.merge(order: order, direction: reverse_direction))
30
32
 
31
33
  wrap_with :table_head_cell, attribute_label(attribute_name, options), options
32
34
  end
@@ -1,3 +1,3 @@
1
1
  module IndexFor
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.0"
3
3
  end
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.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Theo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-04 00:00:00.000000000 Z
11
+ date: 2016-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '3.2'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '5'
22
+ version: '6'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '3.2'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '5'
32
+ version: '6'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: actionpack
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -39,7 +39,7 @@ dependencies:
39
39
  version: '3.2'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: '5'
42
+ version: '6'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,7 +49,7 @@ dependencies:
49
49
  version: '3.2'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '5'
52
+ version: '6'
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: bundler
55
55
  requirement: !ruby/object:Gem::Requirement
@@ -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.6
154
+ rubygems_version: 2.4.8
155
155
  signing_key:
156
156
  specification_version: 4
157
157
  summary: Wrap your objects with a helper to easily list them