effective_bootstrap 0.6.9 → 0.6.10

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
  SHA256:
3
- metadata.gz: 778db97c3c4d202f8c98dab753ec0197d7a52bdcf3036ba1a15524bcc8a21cda
4
- data.tar.gz: 94e9bcac5645082563a17cac8b3a3877d8dca1ae7b28608fd8e5c6ec4ba3f6b6
3
+ metadata.gz: 9c6023371b5aef181763340eb586bcd3446c817e1b02bfabe11ddd30c9dc681a
4
+ data.tar.gz: 607c1b374096530f654b6671e0ad8a1f8822e83480c2e508978256d1a9cab40a
5
5
  SHA512:
6
- metadata.gz: 92b23a5a7f43a5ca4e954198ee1d6dc44ba7d24d5a9811a89970bd60ae1066ae0c45ababdb45a9e74eeaad37b4cbf3a5823ea9484c39a978fd26e91d5d939bbe
7
- data.tar.gz: 4366f548362edd9cfec2de37cb36e6edf7d46064541b7bdb3407f427afe4989ca98d7080c1815978f10031c18b50680dff8f6336f3d7800fe7f66ceac181fadb
6
+ metadata.gz: bd1328021f5e24bca472f45f73d70d3a036ad5f8dc610d7ba32e969b16929c568475fd2e8047f37430fdc595f4fabf8160f204e762001b616d1922fd348e339c
7
+ data.tar.gz: b723220a4201effdd7c873e3a0af10f8e28b427bbc7882e0ac134f8b47d3e3e23a3912793faf897369b1316c77967360b2ed8c150215b30a01e7be3548e412ac
@@ -235,8 +235,9 @@ module EffectiveBootstrapHelper
235
235
  left = 1.upto(last).to_a.first(length)
236
236
  right = 1.upto(last).to_a.last(length)
237
237
  center = []
238
+ max = length + 2
238
239
 
239
- if last <= (length + 2)
240
+ if last <= max
240
241
  left = left - right
241
242
  right = right - left
242
243
  elsif left.include?(page + 1)
@@ -256,9 +257,9 @@ module EffectiveBootstrapHelper
256
257
  [
257
258
  prev_tag,
258
259
  left.map { |index| bootstrap_paginate_tag(index, page, url, params) },
259
- (dots_tag if last > length && left == [1]),
260
+ (dots_tag if last > max && left == [1]),
260
261
  center.map { |index| bootstrap_paginate_tag(index, page, url, params) },
261
- (dots_tag if last > length && right == [last]),
262
+ (dots_tag if last > max && right == [last]),
262
263
  right.map { |index| bootstrap_paginate_tag(index, page, url, params) },
263
264
  next_tag
264
265
  ].flatten.join.html_safe
@@ -1,3 +1,3 @@
1
1
  module EffectiveBootstrap
2
- VERSION = '0.6.9'.freeze
2
+ VERSION = '0.6.10'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.9
4
+ version: 0.6.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-02 00:00:00.000000000 Z
11
+ date: 2019-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails