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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad4deaa87ad2d79873e1c875c573a2a2755e55e8
|
4
|
+
data.tar.gz: 1445d3fcaab0c10c3030099793dc286f6f58a7db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
6
|
-
return
|
7
|
-
|
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
|
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
|
+
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-
|
11
|
+
date: 2015-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|