diff app/controllers/pastes_controller.rb @ 378:e84276bf344a

Immediate return instead of unless ... end.
author nanaya <me@myconan.net>
date Sat, 06 Jun 2015 22:36:32 +0900
parents 6e3e1e7b0212
children 080dd141898c
line wrap: on
line diff
--- a/app/controllers/pastes_controller.rb	Sat Jun 06 22:35:21 2015 +0900
+++ b/app/controllers/pastes_controller.rb	Sat Jun 06 22:36:32 2015 +0900
@@ -62,9 +62,9 @@
 
   def lowercase_path
     correct_path = request.fullpath.downcase
-    unless correct_path == request.fullpath
-      redirect_to correct_path, :status => :moved_permanently
-    end
+    return if correct_path == request.fullpath
+
+    redirect_to correct_path, :status => :moved_permanently
   end
 
   def paste_params