mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
[ci skip] Fix guides to link to edgeapi if on EDGE env
This commit is contained in:
parent
43866b2ca3
commit
75aeac9fdf
1 changed files with 2 additions and 2 deletions
|
@ -16,7 +16,7 @@ HTML
|
|||
end
|
||||
|
||||
def link(url, title, content)
|
||||
if url.start_with?("http://api.rubyonrails.org")
|
||||
if %r{https?://api\.rubyonrails\.org}.match?(url)
|
||||
%(<a href="#{api_link(url)}">#{content}</a>)
|
||||
elsif title
|
||||
%(<a href="#{url}" title="#{title}">#{content}</a>)
|
||||
|
@ -115,7 +115,7 @@ HTML
|
|||
end
|
||||
|
||||
def api_link(url)
|
||||
if %r{http://api\.rubyonrails\.org/v\d+\.}.match?(url)
|
||||
if %r{https?://api\.rubyonrails\.org/v\d+\.}.match?(url)
|
||||
url
|
||||
elsif edge
|
||||
url.sub("api", "edgeapi")
|
||||
|
|
Loading…
Reference in a new issue