actionset 0.2.0 → 0.2.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: c871a0d14017c94fcf75a2b748c17ecba1ab1012
4
- data.tar.gz: fcd8576591a6411bd53f43077041eb06b170f56b
3
+ metadata.gz: 5026afa544f9def59209497c089522877b6ab900
4
+ data.tar.gz: 3bfbd8ff3930d022ac45e8680390ad9a42c4406c
5
5
  SHA512:
6
- metadata.gz: 23c0be2f1fa6591a5eb329192b0fa33a5d40677bcdb58ec3e686441da8992da6962b56d8a9a9c96ec694f894b7dd7c268effe446c95275653103e8aa2afb6e92
7
- data.tar.gz: b41fc568c512ee54557a1b0ee1551a988bfcab9e27c19e01c2124ec36a4b82587ddb832afeefc66ee4b5694ef636622d2218d3c9c2ce9b406b1220ae403f1920
6
+ metadata.gz: f78f95e0cf017f4a22dd8339cfb2338d4ca8c01c97a3d68d7f7200895e74572073be94bc1756fc115cee336660738f8988354275e794d5280b6c70028ecddf0a
7
+ data.tar.gz: e165d731e37993c0a92a3d407642d7823dbaaf5414ae137a5d11fbdf1bb64bdfdb7c859c6c1cfae11acfcc596dc852b5957d336137dfa8330fec22b06d3b9bfd
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v 0.2.1
2
+ - Extract the `set_filters_ivar` method so that app controllers can use it in a before action for filter forms that are present on multiple actions
1
3
  v 0.2.0
2
4
  - Add a new `export_set` method
3
5
  This allows datasets to be transformed into CSV and exported
data/lib/action_set.rb CHANGED
@@ -34,8 +34,7 @@ module ActionSet
34
34
  end
35
35
 
36
36
  def filter_set(set)
37
- @filters = JSON.parse(filter_params.to_json,
38
- object_class: Filter)
37
+ set_filters_ivar
39
38
  active_set = set.is_a?(ActiveSet) ? set : ActiveSet.new(set)
40
39
  active_set = active_set.filter(filter_structure) if filter_params.any?
41
40
  active_set
@@ -54,6 +53,11 @@ module ActionSet
54
53
  send_data(transformed_data, export_set_options(request.format))
55
54
  end
56
55
 
56
+ def set_filters_ivar
57
+ @filters = JSON.parse(filter_params.to_json,
58
+ object_class: Filter)
59
+ end
60
+
57
61
  private
58
62
 
59
63
  def filter_params
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActionSet
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionset
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Margheim
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-24 00:00:00.000000000 Z
11
+ date: 2017-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeset