invisible_controller 0.1.4 → 0.1.5

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: 8b866cfef3589b557a232021b5c8076029c528be
4
- data.tar.gz: 3949106dfe4d79c4509a05f0ccb583d477a2e96f
3
+ metadata.gz: ad4deaa87ad2d79873e1c875c573a2a2755e55e8
4
+ data.tar.gz: 1445d3fcaab0c10c3030099793dc286f6f58a7db
5
5
  SHA512:
6
- metadata.gz: 3c00c4b64ad0c991c35a6ffa435f70c1f2b6a9989be8724b0e55e2a1f4e2085000d84eb8131020fae83fa0646b26ddb2345ff74d1759c2124d7830329b0fc09a
7
- data.tar.gz: 45910cd5bb304b56e3199731e2121600cc482725736f641dbff710a3acc54d986b21b4a68f0a5a2094a7cf582f232509f09e5b75faea420b7ec8588311b188db
6
+ metadata.gz: b5d5b6825b3d7ca0b81d37c2b3a43c6512890f781a14fff63851035c15771699503c7d056ba570d1b4af08d8ec9d6a2e00500fdd44338c3d91e19146611d004e
7
+ data.tar.gz: b86ececbfe7537e0b436fe83a38002fb9fd66c754abb3b461f03315b6bbf79dea25ffe3a224f5244e602399e65082b5ae55d157b5eccdb661f933b2ef0c77137
@@ -2,9 +2,17 @@ module ActiveRecordExtension
2
2
  extend ActiveSupport::Concern
3
3
  module ClassMethods
4
4
  def whitelisted()
5
- return self::WHITELISTED if self.constants.include?(:WHITELISTED)
6
- return column_names - self::BLACKLISTED if self.constants.include?(:BLACKLISTED)
7
- column_names
5
+ return self::WHITELISTED if self.constants.include?(:WHITELISTED)
6
+ return column_names_with_nested_attributes - self::BLACKLISTED if self.constants.include?(:BLACKLISTED)
7
+ column_names_with_nested_attributes
8
+ end
9
+ private
10
+ def column_names_with_nested_attributes
11
+ deliverable = column_names.dup
12
+ nested_attributes_options.keys.each do |key|
13
+ deliverable << {"#{key}_attributes" => key.classify.constantize.whitelisted}
14
+ end
15
+ deliverable
8
16
  end
9
17
  end
10
18
  end
@@ -1,3 +1,3 @@
1
1
  module InvisibleController
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: invisible_controller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Moody
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-12-04 00:00:00.000000000 Z
11
+ date: 2015-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails