mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-02 10:55:30 -04:00
Simplify the request_path_startswith helper method
This commit is contained in:
parent
bd34b803f1
commit
ce88acb9e5
@ -59,12 +59,7 @@ def hash_to_query(hash)
|
||||
end
|
||||
|
||||
def request_path_startswith(env, ary)
|
||||
ary.each do |prefix|
|
||||
if env.request.path.starts_with? prefix
|
||||
return true
|
||||
end
|
||||
end
|
||||
false
|
||||
ary.any? { |prefix| env.request.path.starts_with? prefix }
|
||||
end
|
||||
|
||||
def requesting_static_file(env)
|
||||
|
Loading…
x
Reference in New Issue
Block a user