protected_attributes_continued 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/protected_attributes.rb +1 -0
- data/lib/protected_attributes/version.rb +1 -1
- data/lib/protected_attributes_continued.rb +18 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e24f2d412ba2e3b374a7efc477bc513c985ce9a4
|
4
|
+
data.tar.gz: c6205879e46a4fd1ff6e86cb21e604cb825b79f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ee718e2c2ee7d6e417d6a159055f222f69ef5fb5aa7ddbed3d575ad30a154aaa7b9a98e624c24ae94f9a801ee68499e3142872e8c9e9c67d2ff23d35e9bf5f3
|
7
|
+
data.tar.gz: acfc78413e07de4f486a7ad1d8c4aa33f85726683bbd5f0860838e1cfaaf60e00ad56b594d56f3c15dd844de28402291f5a435d07ff758c0fa88cb83c643a517
|
data/lib/protected_attributes.rb
CHANGED
@@ -1 +1,19 @@
|
|
1
1
|
require "protected_attributes"
|
2
|
+
|
3
|
+
module ActiveRecord
|
4
|
+
module Core
|
5
|
+
def initialize(attributes = nil, options = {})
|
6
|
+
@attributes = self.class._default_attributes.dup
|
7
|
+
self.class.define_attribute_methods
|
8
|
+
|
9
|
+
init_internals
|
10
|
+
initialize_internals_callback
|
11
|
+
|
12
|
+
# +options+ argument is only needed to make protected_attributes gem easier to hook.
|
13
|
+
init_attributes(attributes, options) if attributes
|
14
|
+
|
15
|
+
yield self if block_given?
|
16
|
+
_run_initialize_callbacks
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protected_attributes_continued
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-08-
|
12
|
+
date: 2016-08-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|