actionset 0.1.0 → 0.1.1

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: 702c887ea4be4ff151f1534bf9ff440843e018b7
4
- data.tar.gz: 198cd7d817b312e55f8a1ac7cf162b8fa5551b27
3
+ metadata.gz: 33155aa131204e16b7e9cfc55200f626c083ac2c
4
+ data.tar.gz: d1f28db33d960ca3eeef68b771cdcf35b3ae79cc
5
5
  SHA512:
6
- metadata.gz: 161afab0ca5e7277ce69adffc2ff593fe9f980418991f4b42514750c5eddc40eb09f57a5cc47d89c2a2a7e07125ab1d8619c6ab60c0a9665ebe5a08fe582f865
7
- data.tar.gz: d90f23599901d6d9ab7c79633b16abb6efa5dcf03407509697383dfa84b0d6337f2bf130874ad4ce1319939e3d63051b79cdcbdc082efd49a6992e53900dc2d6
6
+ metadata.gz: d4b84ec08e00391a874cedba4813a26a3d12c41ebe764d593e6f3d358d8f562866577d1ba02c2d2a4c5823d935a15f7fd7662ab16adc4f5105fa68b3938925b7
7
+ data.tar.gz: 341c929bef034d6480f0b40043bb5e11cfb959fecedd336926ee7e2507ea59f71abf7fe8787376a0dd9e9670019fdc125b8251b3021b7d934bd807402cb1d3bf
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v 0.1.1
2
+ - Fix bug in handling sort links when no sort params are present
1
3
  v 0.1.0
2
4
  - make ActionSet a Railtie
3
5
  - add a view helper method for building sort links (`sort_link`)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActionSet
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
@@ -26,7 +26,7 @@ module ActionSet
26
26
  end
27
27
 
28
28
  def sort_link_direction(column)
29
- return 'asc' unless params[:sort].keys.include?(column.to_s)
29
+ return 'asc' unless params[:sort]&.keys&.include?(column.to_s)
30
30
 
31
31
  sort_direction_inverses = { 'asc' => 'desc', 'desc' => 'asc' }
32
32
  sort_direction_inverses[params.dig(:sort, column)]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionset
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Margheim