提交 fef7a773 编写于 作者: J Joshua Peek

Request#subdomain returns a string version of Request#subdomains

上级 7317d9ef
......@@ -81,6 +81,10 @@ def subdomains(tld_length = 1)
parts[0..-(tld_length+2)]
end
def subdomain(tld_length = 1)
subdomains(tld_length).join('.')
end
# Returns the query string, accounting for server idiosyncrasies.
def query_string
@env['QUERY_STRING'].present? ? @env['QUERY_STRING'] : (@env['REQUEST_URI'].to_s.split('?', 2)[1] || '')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册