Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Add note stating no support for Rails 7.0+
Browse files Browse the repository at this point in the history
  • Loading branch information
westonganger committed Aug 20, 2024
1 parent c3af4fe commit 90ba4b5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ jobs:
- ruby: "2.6"
env:
RAILS_VERSION: "6.1"
- ruby: "3.3"
env:
RAILS_VERSION: "7.0"
- ruby: "3.3"
env:
RAILS_VERSION: "7.1"
### TEST NON-DEFAULT DATABASES
- ruby: "3.3"
db_gem: "mysql2"
Expand Down
7 changes: 6 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@ end
gem 'rails', get_env("RAILS_VERSION")

db_gem = get_env("DB_GEM") || "sqlite3"
gem db_gem

if db_gem == "sqlite3"
gem db_gem, "~> 1.4"
else
gem db_gem
end
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

> 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.
> This gem only supports Rails 5.0 to Rails 6.1. Starting in Rails 7.0 some API's have been changed and this gem will not be updated to support it, please transition to strong params or the suggested alternative approach at the bottom of the readme.
Protect attributes from mass-assignment in Active Record models. This gem adds the class methods `attr_accessible` and `attr_protected` to declare white or black lists of attributes.


Expand Down
8 changes: 4 additions & 4 deletions protected_attributes_continued.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ Gem::Specification.new do |gem|
gem.files = Dir["LICENSE.txt", "README.md", "lib/**/*"]
gem.require_paths = ["lib"]

gem.add_dependency "activemodel", ">= 5.0"
gem.add_dependency "activemodel", ">= 5.0", "< 7"

gem.add_development_dependency "activerecord", ">= 5.0"
gem.add_development_dependency "actionpack", ">= 5.0"
gem.add_development_dependency "railties", ">= 5.0"
gem.add_development_dependency "activerecord", ">= 5.0", "< 7"
gem.add_development_dependency "actionpack", ">= 5.0", "< 7"
gem.add_development_dependency "railties", ">= 5.0", "< 7"
gem.add_development_dependency "mocha", "~> 1.4.0"
end

0 comments on commit 90ba4b5

Please sign in to comment.