protected_attributes 1.1.1 → 1.1.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: aac372473a095a28495278d6c7d42f0322bc8dc4
4
- data.tar.gz: 64888dd76e4cb9a56254e5a4efefe967524f0017
3
+ metadata.gz: 0896f7d4e713a4a55bada71439b81882f4850d80
4
+ data.tar.gz: 0f494cc600e6c829a60e6809b53af13fa38a5d08
5
5
  SHA512:
6
- metadata.gz: f7f64b3eba28e34e6e2dd95c54e2988070268257688b628107f2fea3a096aa35c1e6d9333d1f1334aba703d2afd625ca48abad43fddd64362c487d5e636b6207
7
- data.tar.gz: b04a19963ae3b9715dcc16dbcab2202dc7a80ee520b3adc2f9f48a9e34848910ec02cccbda9174b811216370e414696e81716586b841fb4a1e4b98dec3f96046
6
+ metadata.gz: 599ca997afb7175b9a4c962ca1a44aa141fb72e689459a439df317b8bf691f1339bd8e80a9c095f85c742925f59e3733cbb3ace6994605006b95650a7ee03ca1
7
+ data.tar.gz: 830750032eef2832eb5fcfd7b273804067345b31be067c4e7f1a79d7b180d953e2f4cd77ccc124ed4aa670810cc85d663e1cc57cb947af4b38ea8a357f02547e
@@ -93,7 +93,7 @@ module ActiveRecord
93
93
 
94
94
  class HasManyThroughAssociation
95
95
  undef :build_record
96
- undef :options_for_through_record
96
+ undef :options_for_through_record if respond_to?(:options_for_through_record, false)
97
97
 
98
98
  def build_record(attributes, options = {})
99
99
  ensure_not_nested
@@ -1,4 +1,5 @@
1
1
  require "active_model/mass_assignment_security"
2
+ require "protected_attributes/railtie" if defined? Rails::Railtie
2
3
  require "protected_attributes/version"
3
4
 
4
5
  ActiveSupport.on_load :active_record do
@@ -0,0 +1,9 @@
1
+ module ProtectedAttributes
2
+ class Railtie < ::Rails::Railtie
3
+ initializer "protected_attributes.active_record", :before => "active_record.set_configs" do |app|
4
+ if app.config.respond_to?(:active_record) && app.config.active_record.delete(:whitelist_attributes)
5
+ ActiveSupport::Deprection.warn "config.active_record.whitelist_attributes is deprecated and have no effect. Remove its call from the configuration."
6
+ end
7
+ end
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module ProtectedAttributes
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protected_attributes
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-13 00:00:00.000000000 Z
11
+ date: 2015-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -142,6 +142,7 @@ files:
142
142
  - lib/active_record/mass_assignment_security/relation.rb
143
143
  - lib/active_record/mass_assignment_security/validations.rb
144
144
  - lib/protected_attributes.rb
145
+ - lib/protected_attributes/railtie.rb
145
146
  - lib/protected_attributes/version.rb
146
147
  homepage: https://github.com/rails/protected_attributes
147
148
  licenses: