Mercurial > zeropaste
comparison 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 |
comparison
equal
deleted
inserted
replaced
377:4e6afc8140fb | 378:e84276bf344a |
---|---|
60 | 60 |
61 private | 61 private |
62 | 62 |
63 def lowercase_path | 63 def lowercase_path |
64 correct_path = request.fullpath.downcase | 64 correct_path = request.fullpath.downcase |
65 unless correct_path == request.fullpath | 65 return if correct_path == request.fullpath |
66 redirect_to correct_path, :status => :moved_permanently | 66 |
67 end | 67 redirect_to correct_path, :status => :moved_permanently |
68 end | 68 end |
69 | 69 |
70 def paste_params | 70 def paste_params |
71 params.require(:paste).permit(:paste, :paste_gzip, :paste_gzip_base64, :is_private, :key) | 71 params.require(:paste).permit(:paste, :paste_gzip, :paste_gzip_base64, :is_private, :key) |
72 end | 72 end |