dynamic-active-model 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dynamic-active-model/dangerous_attributes_patch.rb +3 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20969c7130d6dd1e4d9fd94404fa7c1429657bcf8c2f7a952521e3518585b2d3
|
4
|
+
data.tar.gz: 8e0ac474187143c277e4a6534d22a7755a7866bc7f1369c4134502b2e9bf702c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e389fb994f7dfc8231f9d464ec5306328c819826b699da3b77345650d2fa7227d1c03cf743334aa4a6ba9a9f1ea6341adc50373a0a14f734c6650aa972fd52d9
|
7
|
+
data.tar.gz: cb2dfb3348ee6d301154214a0e51ac638f54779cecfa10d398812845d41531f8f57b7ae4e286d5f393cdbfcf12cb49c629bd4af3c818ca9bc2316c1a645293e3
|
@@ -5,16 +5,9 @@ module DynamicActiveModel
|
|
5
5
|
# from attribute_names method in ActiveRecord
|
6
6
|
module DangerousAttributesPatch
|
7
7
|
def self.included(base)
|
8
|
-
base.
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
# no-doc
|
13
|
-
module ClassMethods
|
14
|
-
def attribute_names
|
15
|
-
names = original_attribute_names.dup
|
16
|
-
names.reject! { |name| dangerous_attribute_method?(name) }
|
17
|
-
names
|
8
|
+
if base.attribute_names
|
9
|
+
columns_to_ignore = base.attribute_names.select { |name| base.dangerous_attribute_method?(name) }
|
10
|
+
base.ignored_columns = columns_to_ignore
|
18
11
|
end
|
19
12
|
end
|
20
13
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynamic-active-model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Doug Youch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|