dynamic-active-model 0.3.2 → 0.4.2
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80a26c3336b3adc4aeb32e82699b5c6b88fd3ee1722fccdef4b5078a8aef2776
|
4
|
+
data.tar.gz: 45755211d6c67e8f4646923e1082977e2906ff464ef40c81cd93fbfb6b01c8ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e0cdd29bea6837ade3759c9fb9105784d2a94b4fa2583db7591f598e0b784a8e256809ffafd93f0d4ee01aff8ffcef5fd1064e8bd325b060ee89b9a832b7848
|
7
|
+
data.tar.gz: 676d3f6c102f9b011cf5bde8a35df44c6e0b45cd9106fdcc2fb1ed794c5b1b40c50f7a6c6b241a07b88f6aa4241487f033419c225e8664f38f64e035441b2b92
|
@@ -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
|
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
|
+
version: 0.4.2
|
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-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -59,7 +59,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '0'
|
61
61
|
requirements: []
|
62
|
-
rubygems_version: 3.
|
62
|
+
rubygems_version: 3.3.3
|
63
63
|
signing_key:
|
64
64
|
specification_version: 4
|
65
65
|
summary: Dynamic ActiveRecord Models
|