protected_attributes_continued 1.8.2 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 86d47e2aa9219271973c37cb944a3b5722c1d9667718eee090fbf3fe4df2c1de
4
- data.tar.gz: c548ba06b3f2f884b2e6ec4e7ef8252755af23c837c2394d9212a9858e8334e9
3
+ metadata.gz: 188295cb5aeab9eb8b0f161215dffcb78adb55edd7b7672ae9fbaa69695b9864
4
+ data.tar.gz: bce171e972cfbf191ec7bd2f29aa9126f51b1b0daacfd15aadefcbf48356e8de
5
5
  SHA512:
6
- metadata.gz: 74a4ee291ffbd2be19f45ddbee0bdd1b2b489bee22a4298399f814e140094551846bbf50cd4ac481c0ded209f8a80fa0cffb8d1c75c9d73c471d2eae00a133f2
7
- data.tar.gz: c86f600a36c43204c193fd10558f7808857f578c4edbe3cf7af6425be7c7ba7ccc41c65c113305404f8dc18a90576550e66e605cc32185865f0642bd56053d8c
6
+ metadata.gz: a024699f714e830b23db791904529f23bcdbbea10d9c34dff637c9bd4f1c958ec3940dee8f3022cfc8ff0ba24dbe95f07b8e881dba96994846a5bd3d75c45468
7
+ data.tar.gz: 32c0066a02eef87f6bffa576a2815a10f2827b336fff020d9c96651f33903e8dd608082d94a970a139be105fc2f92d8a90343efba7228f93df18b96ddd5d07e1
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Protected Attributes Continued
2
2
  <a href="https://badge.fury.io/rb/protected_attributes_continued" target="_blank"><img height="21" style='border:0px;height:21px;' border='0' src="https://badge.fury.io/rb/protected_attributes_continued.svg" alt="Gem Version"></a>
3
3
  <a href='https://github.com/westonganger/protected_attributes_continued/actions' target='_blank'><img src="https://github.com/westonganger/protected_attributes_continued/workflows/Tests/badge.svg" style="max-width:100%;" height='21' style='border:0px;height:21px;' border='0' alt="CI Status"></a>
4
- <a href='https://rubygems.org/gems/protected_attributes_continued' target='_blank'><img height='21' style='border:0px;height:21px;' src='https://ruby-gem-downloads-badge.herokuapp.com/protected_attributes_continued?label=rubygems&type=total&total_label=downloads&color=brightgreen' border='0' alt='RubyGems Downloads' /></a>
4
+ <a href='https://rubygems.org/gems/protected_attributes_continued' target='_blank'><img height='21' style='border:0px;height:21px;' src='https://img.shields.io/gem/dt/protected_attributes_continued?color=brightgreen&label=Rubygems%20Downloads' border='0' alt='RubyGems Downloads' /></a>
5
5
 
6
6
  > This is the community continued version of [`protected_attributes`](https://github.com/rails/protected_attributes) for Rails 5+. The Rails team dropped this feature and switched to `strong_parameters`. However some applications simply cannot be upgraded or the reduced granularity in params management is a non-issue. To continue supporting this feature going forward we continue the work here.
7
7
 
@@ -126,13 +126,13 @@ class Post < ActiveRecord::Base
126
126
  params.permit(:post).permit(*PERMITTED_ATTRIBUTES)
127
127
  end
128
128
 
129
- PERMITTED_PARAMETERS = [
129
+ PERMITTED_ATTRIBUTES = [
130
130
  :id,
131
131
  :name,
132
132
  :content,
133
133
  :published_at,
134
134
  {
135
- comments_attributes: Comment::PERMITTED_PARAMETERS,
135
+ comments_attributes: Comment::PERMITTED_ATTRIBUTES,
136
136
  }
137
137
  ].freeze
138
138
 
@@ -21,6 +21,8 @@ class ActiveRecord::Base
21
21
  include ActiveRecord::MassAssignmentSecurity::Inheritance
22
22
  end
23
23
 
24
- class ActiveRecord::SchemaMigration < ActiveRecord::Base
25
- attr_accessible :version
24
+ if ActiveRecord.version <= Gem::Version.new("7.0")
25
+ class ActiveRecord::SchemaMigration < ActiveRecord::Base
26
+ attr_accessible :version
27
+ end
26
28
  end
@@ -1,3 +1,3 @@
1
1
  module ProtectedAttributes
2
- VERSION = "1.8.2".freeze
2
+ VERSION = "1.9.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protected_attributes_continued
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.2
4
+ version: 1.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Weston Ganger
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-13 00:00:00.000000000 Z
11
+ date: 2023-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -80,20 +80,6 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 1.4.0
83
- - !ruby/object:Gem::Dependency
84
- name: appraisal
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
83
  description: Protect attributes from mass assignment
98
84
  email:
99
85
  - weston@westonganger.com
@@ -126,7 +112,7 @@ homepage: https://github.com/westonganger/protected_attributes_continued
126
112
  licenses:
127
113
  - MIT
128
114
  metadata: {}
129
- post_install_message:
115
+ post_install_message:
130
116
  rdoc_options: []
131
117
  require_paths:
132
118
  - lib
@@ -141,8 +127,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
127
  - !ruby/object:Gem::Version
142
128
  version: '0'
143
129
  requirements: []
144
- rubygems_version: 3.1.4
145
- signing_key:
130
+ rubygems_version: 3.4.6
131
+ signing_key:
146
132
  specification_version: 4
147
133
  summary: Protect attributes from mass assignment in Active Record models
148
134
  test_files: []