diff options
| author | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-07-01 21:51:52 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-07-01 21:51:52 +0200 |
| commit | db99d0f00ee95b5dd42ea020f8a52e41ef48cdbc (patch) | |
| tree | b2ee6bca0376642436a41f769e7597e89ab83b0e | |
| parent | 95e5fe8b8fb1e16c71ffbed6681ab8b2203249d4 (diff) | |
| download | operum-db99d0f00ee95b5dd42ea020f8a52e41ef48cdbc.tar.gz operum-db99d0f00ee95b5dd42ea020f8a52e41ef48cdbc.zip | |
Upgrade rubocop to the real target ruby/rails
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
| -rw-r--r-- | .rubocop.yml | 4 | ||||
| -rw-r--r-- | app/controllers/searches_controller.rb | 2 | ||||
| -rw-r--r-- | app/controllers/tags_controller.rb | 2 | ||||
| -rw-r--r-- | app/controllers/things_controller.rb | 6 |
4 files changed, 7 insertions, 7 deletions
diff --git a/.rubocop.yml b/.rubocop.yml index cd25bfe..764bab0 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,6 +1,6 @@ AllCops: - TargetRubyVersion: 3.2 - TargetRailsVersion: 7.1 + TargetRubyVersion: 3.4 + TargetRailsVersion: 8.0 DisplayCopNames: true DisplayStyleGuide: false diff --git a/app/controllers/searches_controller.rb b/app/controllers/searches_controller.rb index a01fd59..c811f10 100644 --- a/app/controllers/searches_controller.rb +++ b/app/controllers/searches_controller.rb @@ -57,6 +57,6 @@ class SearchesController < ApplicationController end def search_params - params.require(:search).permit(:name, :body, :description, :shared) + params.expect(search: %i[name body description shared]) end end diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index c56b9f9..7f77f4c 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -73,6 +73,6 @@ class TagsController < ApplicationController end def tag_params - params.require(:tag).permit(:name) + params.expect(tag: [:name]) end end diff --git a/app/controllers/things_controller.rb b/app/controllers/things_controller.rb index f9e7674..cc9b5b0 100644 --- a/app/controllers/things_controller.rb +++ b/app/controllers/things_controller.rb @@ -64,8 +64,8 @@ class ThingsController < ApplicationController end def thing_params - params.require(:thing).permit(:target, :title, :publisher, :address, :year, :url, :access, - :authors, :insideof, :pages, :rate, :status, :kind, :bought_at, - :editors, :note, :where_is_it, tag_ids: []) + params.expect(thing: [:target, :title, :publisher, :address, :year, :url, :access, + :authors, :insideof, :pages, :rate, :status, :kind, :bought_at, + :editors, :note, :where_is_it, { tag_ids: [] }]) end end |
