diff app/controllers/tweets_controller.rb @ 233:0f0cc55ff11b

Character class, not literal D
author nanaya <me@nanaya.net>
date Fri, 14 Jul 2023 01:45:40 +0900
parents f9fd9d9cab97
children 7a773720d81f
line wrap: on
line diff
--- a/app/controllers/tweets_controller.rb	Mon Jan 16 16:23:36 2023 +0900
+++ b/app/controllers/tweets_controller.rb	Fri Jul 14 01:45:40 2023 +0900
@@ -4,7 +4,7 @@
   end
 
   def show
-    return redirect if params[:id][/D/].present?
+    return redirect if params[:id][/\D/].present?
 
     client = Tweet.new(params[:id].to_i)
     @user = client.user