about summary refs log tree commit diff
path: root/app/controllers/media_proxy_controller.rb
diff options
context:
space:
mode:
authorJustin Tracey <j2tracey@gmail.com>2021-02-19 08:56:14 +0000
committerGitHub <noreply@github.com>2021-02-19 09:56:14 +0100
commitc9e8e1739c698291e1b034d19a1b01d75c9e039b (patch)
tree4d1aa255c0d76e2f518f611582dae2d09f84af02 /app/controllers/media_proxy_controller.rb
parentfc145de23865ebc957cde50f66844bcfad475e47 (diff)
replace all instances of "ends_with?" with "end_with?" (#15745)
The "ends_with?" method is just a Rails alias of Ruby's "end_with?" method.
Using the latter makes the code less brittle.
Diffstat (limited to 'app/controllers/media_proxy_controller.rb')
-rw-r--r--app/controllers/media_proxy_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/media_proxy_controller.rb b/app/controllers/media_proxy_controller.rb
index 0b1d09de9..1b610318d 100644
--- a/app/controllers/media_proxy_controller.rb
+++ b/app/controllers/media_proxy_controller.rb
@@ -37,7 +37,7 @@ class MediaProxyController < ApplicationController
   end
 
   def version
-    if request.path.ends_with?('/small')
+    if request.path.end_with?('/small')
       :small
     else
       :original