aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2026-06-03 10:35:43 +0200
committerMiquel Sabaté Solà <mssola@mssola.com>2026-06-03 10:35:43 +0200
commite4325f3d984d873d761e770bd4c42cabcd1df88a (patch)
treec61e6cf3aa122bd006b4feb6bada47160ccc6c78 /app
parent7508b08628c435cf80957ae46828615446cdc8be (diff)
downloadoperum-e4325f3d984d873d761e770bd4c42cabcd1df88a.tar.gz
operum-e4325f3d984d873d761e770bd4c42cabcd1df88a.zip
Upgrade to the latest Rails
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'app')
-rw-r--r--app/controllers/comments_controller.rb6
-rw-r--r--app/controllers/exports_controller.rb2
-rw-r--r--app/controllers/searches_controller.rb2
-rw-r--r--app/controllers/shared_searches_controller.rb2
-rw-r--r--app/controllers/things_controller.rb2
5 files changed, 7 insertions, 7 deletions
diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb
index d362460..c4b21cb 100644
--- a/app/controllers/comments_controller.rb
+++ b/app/controllers/comments_controller.rb
@@ -38,7 +38,7 @@ class CommentsController < ApplicationController
end
def destroy
- comment = Comment.find(params[:id])
+ comment = Comment.find(params.expect(:id))
comment.destroy
handle_from_param!(from: params[:from])
@@ -51,11 +51,11 @@ class CommentsController < ApplicationController
end
def set_thing
- @thing = Thing.find(params[:thing_id])
+ @thing = Thing.find(params.expect(:thing_id))
end
def set_comment
- @comment = Comment.find(params[:id])
+ @comment = Comment.find(params.expect(:id))
end
def handle_from_param!(from:)
diff --git a/app/controllers/exports_controller.rb b/app/controllers/exports_controller.rb
index 4b809c9..975293b 100644
--- a/app/controllers/exports_controller.rb
+++ b/app/controllers/exports_controller.rb
@@ -34,7 +34,7 @@ class ExportsController < ApplicationController
@search = if params[:search_id].to_i.zero?
Search.new(id: 0, name: 'Home')
else
- Search.find(params[:search_id])
+ Search.find(params.expect(:search_id))
end
@subtitle = @search.name
end
diff --git a/app/controllers/searches_controller.rb b/app/controllers/searches_controller.rb
index ff738c2..1585cce 100644
--- a/app/controllers/searches_controller.rb
+++ b/app/controllers/searches_controller.rb
@@ -52,7 +52,7 @@ class SearchesController < ApplicationController
protected
def set_search
- @search = Search.find(params[:id])
+ @search = Search.find(params.expect(:id))
@subtitle = @search.name
end
diff --git a/app/controllers/shared_searches_controller.rb b/app/controllers/shared_searches_controller.rb
index ffdd56e..c90a353 100644
--- a/app/controllers/shared_searches_controller.rb
+++ b/app/controllers/shared_searches_controller.rb
@@ -10,7 +10,7 @@ class SharedSearchesController < ApplicationController
end
def show
- @search = Search.where(shared: true).find(params[:search_id])
+ @search = Search.where(shared: true).find(params.expect(:search_id))
@subtitle = @search.name
@results = @search.results.values.flatten
end
diff --git a/app/controllers/things_controller.rb b/app/controllers/things_controller.rb
index 97761aa..4a04249 100644
--- a/app/controllers/things_controller.rb
+++ b/app/controllers/things_controller.rb
@@ -59,7 +59,7 @@ class ThingsController < ApplicationController
private
def set_thing
- @thing = Thing.find(params[:id])
+ @thing = Thing.find(params.expect(:id))
@subtitle = @thing.title
end