Commit e241d1e6 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix form label for ssl requests

parent 52d8ed9e
......@@ -11,6 +11,14 @@ module ApplicationHelper
true
end
def request_protocol
request.ssl? ? "https" : "http"
end
def web_app_url
"#{request_protocol}://#{GIT_HOST["host"]}/"
end
def body_class(default_class = nil)
main = content_for(:body_class).blank? ?
default_class :
......
......@@ -20,7 +20,7 @@
Code
.input
.input-prepend
%span.add-on= "http://#{GIT_HOST["host"]}/"
%span.add-on= web_app_url
= f.text_field :code, :placeholder => "example"
- unless @admin_project.new_record?
......
......@@ -19,7 +19,7 @@
Code
.input
.input-prepend
%span.add-on= "http://#{GIT_HOST["host"]}/"
%span.add-on= web_app_url
= f.text_field :code, :placeholder => "example"
- unless @project.new_record? || @project.heads.empty?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment