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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a5c61e4496583efcf5b031244b5ee48cfd15176f
4
- data.tar.gz: e4e9a8836d6c007b27fab0df627f01f2ed25c831
3
+ metadata.gz: e24f2d412ba2e3b374a7efc477bc513c985ce9a4
4
+ data.tar.gz: c6205879e46a4fd1ff6e86cb21e604cb825b79f0
5
5
  SHA512:
6
- metadata.gz: 736d41376d4ad0ba0af4f3998e821f601791d779f38d06b6746d643c5a60582b48143ef30e9e9b503096ec340cecc0275c2af104b0073f36e616f042727dbed0
7
- data.tar.gz: 936c8843dddcc143a3eb1b47bd7ef5fbea59b2433857b6217485bb6f1999be0df01500bdc1eec3ecc904470f5aa64f56dd08bff2e8725feeba714c0cc4842696
6
+ metadata.gz: 5ee718e2c2ee7d6e417d6a159055f222f69ef5fb5aa7ddbed3d575ad30a154aaa7b9a98e624c24ae94f9a801ee68499e3142872e8c9e9c67d2ff23d35e9bf5f3
7
+ data.tar.gz: acfc78413e07de4f486a7ad1d8c4aa33f85726683bbd5f0860838e1cfaaf60e00ad56b594d56f3c15dd844de28402291f5a435d07ff758c0fa88cb83c643a517
@@ -1,3 +1,4 @@
1
+ require 'active_record/core'
1
2
  require "active_model/mass_assignment_security"
2
3
  require "protected_attributes/railtie" if defined? Rails::Railtie
3
4
  require "protected_attributes/version"
@@ -1,3 +1,3 @@
1
1
  module ProtectedAttributes
2
- VERSION = "1.2.1"
2
+ VERSION = "1.2.2"
3
3
  end
@@ -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.1
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-22 00:00:00.000000000 Z
12
+ date: 2016-08-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemodel