changeset 378:e84276bf344a

Immediate return instead of unless ... end.
author nanaya <me@myconan.net>
date Sat, 06 Jun 2015 22:36:32 +0900
parents 4e6afc8140fb
children 2ad092e60975 95bb6750003e
files app/controllers/pastes_controller.rb
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
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